Skip to content

fix: handle nullable bitmap on Android - #4297

Merged
mfazekas merged 1 commit into
rnmapbox:mainfrom
Preeternal:fix-nullable-bitmap-copy
Sep 21, 2026
Merged

mfazekas merged 1 commit into
rnmapbox:mainfrom
Preeternal:fix-nullable-bitmap-copy

Conversation

@Preeternal

Copy link
Copy Markdown
Contributor

Description

Fixes an Android compilation failure in DownloadMapImageTask.kt when building with React Native 0.87.1.

CloseableStaticBitmap.underlyingBitmap is nullable, but DownloadMapImageTask calls copy() on it directly.

Reproducer

Build an Android app using:

  • React Native 0.87.1
  • @rnmapbox/maps 10.3.5
  • New Architecture

The build fails during :rnmapbox_maps:compileDebugKotlin with:

DownloadMapImageTask.kt:80:56 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'Bitmap?'.

Verification

After the change, :rnmapbox_maps:compileDebugKotlin succeeds and the Android build proceeds past this task.

@mfazekas mfazekas closed this Sep 20, 2026
@mfazekas mfazekas reopened this Sep 20, 2026
@mfazekas
mfazekas merged commit e33400c into rnmapbox:main Sep 21, 2026
6 of 9 checks passed

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants