Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build on Android with React Native 0.75 #3593

Closed
alexanderoskin opened this issue Aug 22, 2024 · 18 comments
Closed

Can't build on Android with React Native 0.75 #3593

alexanderoskin opened this issue Aug 22, 2024 · 18 comments

Comments

@alexanderoskin
Copy link

Environment

  • Dev OS: OSX 14.6.1
  • @rnmapbox/maps version: 10.1.29
  • React Native version: 0.75.2
  • Expo version: -

Steps to reproduce

npx [email protected] init sample --version 0.75.2
cd sample
yarn add rnmapbox/maps
yarn android

Result

> Task :rnmapbox_maps:compileReleaseKotlin

e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:213:5 'addView' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:228:5 'removeView' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:237:5 'removeAllViews' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:89:5 'addView' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:93:5 'getChildCount' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:97:5 'getChildAt' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt:101:5 'removeViewAt' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:13:5 'getChildAt' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:17:5 'getChildCount' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:21:5 'addView' overrides nothing
e: file:///.../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:25:5 'removeViewAt' overrides nothing

> Task :rnmapbox_maps:compileReleaseKotlin FAILED
@tomschiffmann
Copy link

I have the same error, it has started when upgrading to version 75. On iOS it works fine.

@PavelShev
Copy link

i have the same issue with build on 0.75.1 and 0.75.2
Namespace 'android.support.graphics.drawable' is used in multiple modules and/or libraries: com.android.support:animated-vector-drawable:28.0.0, com.android.support:support-vector-drawable:28.0.0. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace

@Pamavoc
Copy link

Pamavoc commented Aug 22, 2024

same here

@StasSharp
Copy link

Having the same issue

@paulschreiber
Copy link
Contributor

@mfazekas
Copy link
Contributor

Just published https://github.com/rnmapbox/maps/releases/tag/v10.1.30-rc.0 pls test

@tomschiffmann
Copy link

Works 🥳
Thanks @mfazekas

@PavelShev
Copy link

Just published https://github.com/rnmapbox/maps/releases/tag/v10.1.30-rc.0 pls test

works like a charm
Thanks!

@cixio
Copy link
Contributor

cixio commented Aug 26, 2024

Works. Thanks!

@snowdamiz
Copy link

snowdamiz commented Aug 26, 2024

I'm still having this issue using the 10.1.30-rc.0 version

@badredaha
Copy link

Same here ! Still having the problem !!!

@anthonybtedesco
Copy link

I'm still having this problem even after replacing node_module/@rnmapbox/maps with the 10.1.30-rc.0 version of the source code.

@MinaSamir11
Copy link

MinaSamir11 commented Aug 27, 2024

Same Issue here. in addition to this issue

e: ****/node_modules/@rnmapbox/maps/android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/ResourceDrawableIdHelper.kt:5:37 Unresolved reference: Companion)

@rnmapbox/maps version: 10.1.30

@snowdamiz
Copy link

snowdamiz commented Aug 27, 2024

@badredaha @anthonybtedesco @MinaSamir11
I don't know if you guys are developing with expo but this is how I fixed it in my case and my understanding of the issue.

Issue: gradle version target mismatch between expo and rnmaps

I believe rnmaps pushed a change to the default version of the library that changed the gradle version target. Since im using expo managed workflow, it handles all of that behind the scenes. When the change happened with the library it became mismatched with the expo gradle version. In my case this happened because I had the version of rnmapbox set with a ^. Since at this point expo was targeting an older version of gradle I simply chose a version of rnmapbox that matches the target version which in my case was "@rnmapbox/maps": "10.1.29",.

My working setup for reference
I was able to build a preview and a production build with no issues

"dependencies": {
    "@rnmapbox/maps": "10.1.29",
    "expo": "~51.0.26",
  },

@badredaha
Copy link

No Expo. I use RN CLI

@MinaSamir11
Copy link

@badredaha @anthonybtedesco @MinaSamir11

I don't know if you guys are developing with expo but this is how I fixed it in my case and my understanding of the issue.

Issue: gradle version target mismatch between expo and rnmaps

I believe rnmaps pushed a change to the default version of the library that changed the gradle version target. Since im using expo managed workflow, it handles all of that behind the scenes. When the change happened with the library it became mismatched with the expo gradle version. In my case this happened because I had the version of rnmapbox set with a ^. Since at this point expo was targeting an older version of gradle I simply chose a version of rnmapbox that matches the target version which in my case was "@rnmapbox/maps": "10.1.29",.

My working setup for reference

I was able to build a preview and a production build with no issues


"dependencies": {

    "@rnmapbox/maps": "10.1.29",

    "expo": "~51.0.26",

  },

Using Cli, issue coming from the compilation error, due to gradle maybe.

@mfazekas
Copy link
Contributor

This bug was fixed in latest release. If you still have issues and can repro on a new project open a new issue with steps

@badredaha
Copy link

I use v10.1.30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests