[Bug]: Expo 53 Task :rnmapbox_maps:compileDebugKotlin FAILED
Mapbox Implementation
Mapbox
Mapbox Version
10.1.38
React Native Version
0.79.2
Platform
Android
@rnmapbox/maps version
10.1.38
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}}>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
Starting project getting error
Expected behavior
No response
Notes / preliminary analysis
No response
Additional links and references
No response
same to me. i can't build that app
yarn android
yarn run v1.22.22
$ expo run:android
βΊ Building app...
Configuration on demand is an incubating feature.
> Configure project :
[ExpoRootProject] Using the following versions:
- buildTools: 35.0.0
- minSdk: 24
- compileSdk: 35
- targetSdk: 35
- ndk: 27.1.12297006
- kotlin: 2.0.21
- ksp: 2.0.21-1.0.28
> Configure project :app
βΉοΈ Applying gradle plugin 'expo-dev-launcher-gradle-plugin'
> Configure project :expo
Using expo modules
- expo-constants (17.1.5)
- expo-dev-client (5.1.7)
- expo-dev-launcher (5.1.10)
- expo-dev-menu (6.1.9)
- expo-dev-menu-interface (1.10.0)
- expo-json-utils (0.15.0)
- expo-manifests (0.16.4)
- expo-modules-core (2.3.12)
- expo-updates-interface (1.1.0)
- [π¦] expo-asset (11.1.4)
- [π¦] expo-blur (14.1.4)
- [π¦] expo-file-system (18.1.8)
- [π¦] expo-font (13.3.0)
- [π¦] expo-haptics (14.1.4)
- [π¦] expo-image (2.1.6)
- [π¦] expo-keep-awake (14.1.4)
- [π¦] expo-linking (7.1.4)
- [π¦] expo-splash-screen (0.30.8)
- [π¦] expo-system-ui (5.0.7)
- [π¦] expo-web-browser (14.1.6)
> Configure project :react-native-reanimated
Android gradle plugin: 8.8.2
Gradle: 8.13
> Task :rnmapbox_maps:compileDebugKotlin
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:252:29 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:252:49 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:252:91 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:255:51 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:255:80 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:18:27 Unresolved reference 'ViewTreeLifecycleOwner'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:119:30 Class '<anonymous>' is not abstract and does not implement abstract member 'lifecycle'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:134:17 'getLifecycle' overrides nothing.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:138:13 Unresolved reference 'ViewTreeLifecycleOwner'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:37:16 Argument type mismatch: actual type is 'kotlin.String?', but 'kotlin.String' was expected.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:43:9 Argument type mismatch: actual type is 'kotlin.String?', but 'kotlin.String' was expected.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:85:28 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:107:29 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:124:45 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:124:55 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:126:33 Argument type mismatch: actual type is 'com.facebook.react.bridge.ReadableMap?', but 'com.facebook.react.bridge.ReadableMap' was expected.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt:126:41 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceManager.kt:122:40 None of the following candidates is applicable:
fun literal(value: HashMap<String, Any>): Expression
fun literal(value: List<Any>): Expression
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:44:26 Argument type mismatch: actual type is 'kotlin.String?', but 'kotlin.String' was expected.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/shapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.kt:213:41 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/shapeAnimators/RNMBXChangeLineOffsetsShapeAnimatorModule.kt:213:59 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/Dynamic.kt:41:42 None of the following candidates is applicable:
static fun valueOf(p0: Double): Value
static fun valueOf(p0: Long): Value
static fun valueOf(p0: Boolean): Value
static fun valueOf(p0: String): Value
static fun valueOf(p0: (MutableList<Value!>..List<Value!>)): Value
static fun valueOf(p0: HashMap<String!, Value!>): Value
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/Dynamic.kt:42:46 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/Dynamic.kt:43:42 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/ReadableArray.kt:49:53 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/ReadableArray.kt:50:57 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableArray?'.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/ReadableMap.kt:28:26 Argument type mismatch: actual type is 'kotlin.Any?', but 'kotlin.Any' was expected.
e: file:///home/umar/Files/Coding/React/Expo/public-service/node_modules/@rnmapbox/maps/android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/ReadableMap.kt:6:12 Return type mismatch: expected 'kotlin.collections.Iterator<kotlin.collections.Map.Entry<kotlin.String, kotlin.Any>>', actual 'kotlin.collections.Iterator<kotlin.collections.Map.Entry<kotlin.String, kotlin.Any?>>'.
> Task :rnmapbox_maps:compileDebugKotlin FAILED
The Daemon will expire after the build after running out of JVM Metaspace.
The project memory settings are likely not configured or are configured to an insufficient value.
The daemon will restart for the next build, which may increase subsequent build times.
These settings can be adjusted by setting 'org.gradle.jvmargs' in 'gradle.properties'.
The currently configured max heap space is '2 GiB' and the configured max metaspace is '512 MiB'.
For more information on how to set these values, please refer to https://docs.gradle.org/8.13/userguide/build_environment.html#sec:configuring_jvm_memory in the Gradle documentation.
To disable this warning, set 'org.gradle.daemon.performance.disable-logging=true'.
Daemon will be stopped at the end of the build after running out of JVM Metaspace
[Incubating] Problems report is available at: file:///home/umar/Files/Coding/React/Expo/public-service/android/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':rnmapbox_maps:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.13/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 59s
383 actionable tasks: 11 executed, 372 up-to-date
Error: /home/umar/Files/Coding/React/Expo/public-service/android/gradlew app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=x86_64,arm64-v8a exited with non-zero code: 1
Error: /home/umar/Files/Coding/React/Expo/public-service/android/gradlew app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=x86_64,arm64-v8a exited with non-zero code: 1
at ChildProcess.completionListener (/home/umar/Files/Coding/React/Expo/public-service/node_modules/@expo/spawn-async/src/spawnAsync.ts:67:13)
at Object.onceWrapper (node:events:639:26)
at ChildProcess.emit (node:events:524:28)
at maybeClose (node:internal/child_process:1101:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
...
at spawnAsync (/home/umar/Files/Coding/React/Expo/public-service/node_modules/@expo/spawn-async/src/spawnAsync.ts:28:21)
at spawnGradleAsync (/home/umar/Files/Coding/React/Expo/public-service/node_modules/@expo/cli/src/start/platforms/android/gradle.ts:134:28)
at assembleAsync (/home/umar/Files/Coding/React/Expo/public-service/node_modules/@expo/cli/src/start/platforms/android/gradle.ts:83:16)
at runAndroidAsync (/home/umar/Files/Coding/React/Expo/public-service/node_modules/@expo/cli/src/run/android/runAndroidAsync.ts:65:24)
There is a pull request that fixes this, applying the patch here fixed the issue for me.
i have the same issue
Started from here https://github.com/rnmapbox/maps/issues/3492#issuecomment-2863772933, seems to work
Same to me. The patch didn't solve the bug
Similar thing happening to me. I managed to build with the patch but then it crashes immediately on app open
Same here, any news about the next version that will patch it ?
Same issue, I have tried multiple versions of library with react native 0.79 project and 0.76 but didn't worked
Same issue here, patch doesn't seem to solve it.
Can anyone try *39 release pls?
I am trying i noticed this line when starting expo
[Codegen] [DEPRECATED] @rnmapbox/maps should add the 'ios.componentProvider' property in their codegenConfig
10.1.38 Tried this doesn't work in android. @MariuzM
Might be unrelated but good damn
I'm really confused why cocopods have updated version?
My process when installing all packages i always delete ios android folders and rebuild everything from scratch but i donβt understand this
Ok so the 39 is working for me on Android now but weird thing about this Expo Linking and why cocopods have newer version then my npm package ?
I can confirm there is still some weird issues with mapbox so annoying
Using latest patched release version 10.1.39 fixed it for me (I was previously locked into 10.1.36 without a ^)
@rnmapbox/maps: ^10.1.39 expo: ^53.0.11 react-native: 0.79.3
I can confirm there is still some weird issues with mapbox so annoying
![]()
stuck for three days in this issue
I also had some trouble compiling kotlin, I had issues getting the newest version up and running. Maybe this will help some of you too:
Ok I finally got it working.
Not totally sure what the exact issue was. Because for me it was a mismatch between kotlinVersion, Gradle, java or React-Native.
So I will share my setup:
java version: jdk-17.0.2
App level build.gradle: https://pastebin.com/b17W6R8x
Android build.gradle: https://pastebin.com/JAcJ7n8z
android/app/src/main/java/com/APPNAME/MainApplication.kt: https://pastebin.com/cPxEP4WH
package.json: https://pastebin.com/hg7kieuA
gradle-wrapper.properties: https://pastebin.com/q9Nfd8c1
Thanks for helping
On Thu, 10 Jul 2025 at 19:08, timtim32 @.***> wrote:
timtim32 left a comment (rnmapbox/maps#3851) https://github.com/rnmapbox/maps/issues/3851#issuecomment-3057618493
I had issues getting the newest version up and running. Maybe this will help some of you too:
Ok I finally got it working.
Not totally sure what the exact issue was. Because for me it was a mismatch between kotlinVersion, Gradle, java or React-Native.
So I will share my setup:
java version: jdk-17.0.2
App level build.gradle: https://pastebin.com/b17W6R8x
Android build.gradle: https://pastebin.com/JAcJ7n8z
android/app/src/main/java/com/APPNAME/MainApplication.kt: https://pastebin.com/cPxEP4WH
package.json: https://pastebin.com/hg7kieuA
gradle-wrapper.properties: https://pastebin.com/q9Nfd8c1
β Reply to this email directly, view it on GitHub https://github.com/rnmapbox/maps/issues/3851#issuecomment-3057618493, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN73KYONL2GMJWPX7FOSWC33HZXU3AVCNFSM6AAAAAB4JG6ODKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANJXGYYTQNBZGM . You are receiving this because you commented.Message ID: @.***>
I had the same error when upgrading Expo from 52 to 53 and I confirm that upgrading @rnmapbox/maps from 10.1.36 to 10.1.39 fixed it for me.
Don't forget to run the prebuild comment again to rebuild the native code
I had the same error when upgrading Expo from 52 to 53 and I confirm that upgrading @rnmapbox/maps from 10.1.36 to 10.1.39 fixed it for me.
Don't forget to run the prebuild comment again to rebuild the native code
is it working in both android and iOS ?
To add some more context to this, I've found updating the targetSdk to 35 (as soon to be required by Play Console) is causing the issue. Attempting to then set the RNMapboxMapsVersion to 11.13.4 didn't fix it.
Environment: Expo: 52.0.47 React Native: 0.76.9 @rnmapbox/maps: 10.1.39
I had the same error when upgrading Expo from 52 to 53 and I confirm that upgrading @rnmapbox/maps from 10.1.36 to 10.1.39 fixed it for me. Don't forget to run the prebuild comment again to rebuild the native code
is it working in both android and iOS ?
Yes this worked on both Android and iOS "expo": "^53.0.0" "react-native": "0.79.5" "@rnmapbox/maps": "10.1.39"
@mfazekas completed how? Is there a commit/PR that fixes it? An upcoming release?
@mgray88 yes /RNMBXImagesManager.kt:252:29 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.fac was fixed in recent versions. See changelogs in GitHub releases, for more details