Comments (25)
Force the rnmapbox version to be 10.1.29
or lower. This library raised the gradle target version so its no longer matching your RN gradle version.
My workiing setup although I am using expo:
{
"react-native": "0.74.5",
"@rnmapbox/maps": "10.1.29",
}
from maps.
Hey folks, I'm having a similar issue:
Environment
Dev OS: Windows @rnmapbox/maps version: 10.1.29 React Native version: 0.74.3 Expo version: 51.0.23
Result running yarn android
> Task :rnmapbox_maps:compileDebugKotlin FAILED e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:212:5 'addView' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:227:5 'removeView' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:236:5 'removeAllViews' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:13:5 'getChildAt' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:17:5 'getChildCount' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:21:5 'addView' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:25:5 'removeViewAt' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/ResourceDrawableIdHelper.kt:5:37 Unresolved reference: Companion FAILURE: Build failed with an exception.
Here is my working setup for expo right now
{
"expo": "~51.0.26",
"@rnmapbox/maps": "10.1.29",
"react-native": "0.74.5",
}
from maps.
Hey folks, I'm having a similar issue:
Environment
Dev OS: Windows @rnmapbox/maps version: 10.1.29 React Native version: 0.74.3 Expo version: 51.0.23
Result running yarn android
> Task :rnmapbox_maps:compileDebugKotlin FAILED e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:212:5 'addView' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:227:5 'removeView' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:236:5 'removeAllViews' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:13:5 'getChildAt' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:17:5 'getChildCount' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:21:5 'addView' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:25:5 'removeViewAt' overrides nothing e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/ResourceDrawableIdHelper.kt:5:37 Unresolved reference: Companion FAILURE: Build failed with an exception.
Here is my working setup for expo right now
{ "expo": "~51.0.26", "@rnmapbox/maps": "10.1.29", "react-native": "0.74.5", }
Thank you, you just saved me a LOT of headache. Granted it's my own fault, I should've checked the issues earlier. I Thought It was something I did in my code. For now this is the best solution and can confirm works.
from maps.
I also had the issue on RN 0.74, reverting to rnmapbox/maps 10.1.27 solved the issue.
from maps.
same:
"@rnmapbox/maps": "^10.1.28",
Remove the ^
. What is your RN version?
from maps.
same:
"@rnmapbox/maps": "^10.1.28",Remove the
^
. What is your RN version?
I fixed by changing to:
from maps.
Yes same here ++
from maps.
same here, 10.1.29 doesnt solve the issue, ios is fine
from maps.
same here, 10.1.29 doesnt solve the issue, ios is fine
Yea it looks like you are having a different issue than what op had
from maps.
Hey folks, I'm having a similar issue:
Environment
Dev OS: Windows
@rnmapbox/maps version: 10.1.29
React Native version: 0.74.3
Expo version: 51.0.23
Result running yarn android
> Task :rnmapbox_maps:compileDebugKotlin FAILED
e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:212:5 'addView' overrides nothing
e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:227:5 'removeView' overrides nothing
e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt:236:5 'removeAllViews' overrides nothing
e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:13:5 'getChildAt' overrides nothing
e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:17:5 'getChildCount' overrides nothing
e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:21:5 'addView' overrides nothing
e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt:25:5 'removeViewAt' overrides nothing
e: file:///C:/Users/lucas/Documents/development/app/node_modules/@rnmapbox/maps/android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/ResourceDrawableIdHelper.kt:5:37 Unresolved reference: Companion
FAILURE: Build failed with an exception.
from maps.
@snowdamiz Thank you, reverting to "10.1.29"
resolved the issue for me!
from maps.
@TobiDevloft you can open the issue. I'll need to take a look, to see if we can make rnmapbox compatible with both RN<0.75 and >=0.75. In 10.1.30 I've made it compile with RN 0.75, but it sounds like this breaks with <=RN 0.74. At worst we'll need to provide patches so ppl can use the latest version with older react using patch-packages
from maps.
Alright, reopening! Thanks for your work :)
from maps.
I have the same problem, did you find a solution?
"react-native": "0.72.1",
"@rnmapbox/maps": "10.1.29"
from maps.
same:
"@rnmapbox/maps": "^10.1.28",
from maps.
released v10.1.31-rc.0 this should work with RN 0.75, and 0.72 pls test
from maps.
I still have this issue with v10.1.31-rc.0:
Task :rnmapbox_maps:compileDebugKotlin FAILED
e: ResourceDrawableIdHelper.kt:5:37 Unresolved reference: Companion
ext.kotlinVersion = '1.9.21'
[email protected]
@rnmapbox/[email protected]
Just did another test with 0.72 but it still fails with rc.0:
npx react-native init MapboxTest --version 0.72.1
cd MapboxTest
yarn add @rnmapbox/[email protected]
# update android/build.grale with maven repo details
yarn android
> Task :rnmapbox_maps:compileDebugKotlin FAILED
45 actionable tasks: 45 executed
info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
e: /Users/mattijs/Development/MapboxTest/node_modules/@rnmapbox/maps/android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/ResourceDrawableIdHelper.kt: (5, 37): Unresolved reference: Companion
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
from maps.
I think it's better for now to either not override ResourceDrawableIdHelper.getInstance
and just use the deprecated ResourceDrawableIdHelper.getInstance
in the codebase. Or create a
class ResourceDrawableIdHelperCompat {
companion object {
fun getInstance(): ResourceDrawableIdHelper {
return ResourceDrawableIdHelper.getInstance() // deprecated, .instance is preferred but can't be used on rn <0.75
}
}
}
and reference ResourceDrawableIdHelperCompat
everywhere but it doesn't make much sense expect for have a single point for refactoring the accessor later on.
from maps.
@mattijsf thanks, do you have new arch enabled? Not sure why I haven't seen this issue, while testing...
Sure we can remove getInstance
override. I think a few RC's ago this was RN0.75 was not working without it. Sure we can live with deprecated.
from maps.
@mattijsf thanks, do you have new arch enabled? Not sure why I haven't seen this issue, while testing... Sure we can remove
getInstance
override. I think a few RC's ago this was RN0.75 was not working without it. Sure we can live with deprecated.
I'm not using new arch. Just the instructions I wrote in #3598 (comment) are enough. Maybe you hit some caching / node_modules situation where the build succeeded with the change 🤷
from maps.
Force the rnmapbox version to be
10.1.29
or lower. This library raised the gradle target version so its no longer matching your RN gradle version.My workiing setup although I am using expo:
{ "react-native": "0.74.5", "@rnmapbox/maps": "10.1.29", }
I am using the same version, but still failed
from maps.
I still have this issue with v10.1.31-rc.0:
Task :rnmapbox_maps:compileDebugKotlin FAILED
e: ResourceDrawableIdHelper.kt:5:37 Unresolved reference: Companionext.kotlinVersion = '1.9.21' [email protected] @rnmapbox/[email protected]
Just did another test with 0.72 but it still fails with rc.0:
npx react-native init MapboxTest --version 0.72.1 cd MapboxTest yarn add @rnmapbox/[email protected] # update android/build.grale with maven repo details yarn android> Task :rnmapbox_maps:compileDebugKotlin FAILED 45 actionable tasks: 45 executed info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor e: /Users/mattijs/Development/MapboxTest/node_modules/@rnmapbox/maps/android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/ResourceDrawableIdHelper.kt: (5, 37): Unresolved reference: Companion 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
same here
from maps.
It's unbelievable the amount of people that don't bother reading comments. Pure laziness 😂
from maps.
Can you try with v10.1.31-rc.1 ?
released v10.1.31-rc.1 this should work with RN 0.75, and 0.72 pls test
from maps.
I can confirm this is working for me
{
"react-native": "0.74.3",
"@rnmapbox/maps": "10.1.29",
}
from maps.
Related Issues (20)
- [Bug]: EXC_BREAKPOINT of unknown cause HOT 7
- [Bug]: multiPolygon common borders are not drawn/shown HOT 2
- [Bug]: TypeScript Error with "noUncheckedIndexedAccess" in tsconfig.json HOT 2
- [Bug]: 3D terrain does not show with Mapbox v11 HOT 1
- Can't build on Android with React Native 0.75 HOT 18
- [Bug]: Event handlers not called in web environment
- [Bug]: The `CameraPadding` lists all edges as being required even though the code allows them to be optional
- [Bug]: Execution failed for task ':rnmapbox_maps:compileDebugKotlin'. HOT 4
- Expo managed flow - android build 403 error (locally) HOT 4
- RNMapboxMapsDownloadToken is exposed when using expo:prebuild under build.gradle and podfile HOT 3
- [Bug]: Update tileUrl not working HOT 3
- [Bug]: `setSourceVisibility` not working
- React Native iOS build failure
- [Bug]: ShapeSource.getClusterLeaves crash on iOS (NOBRIDE mode)
- [Bug]: snapshotManager.takeSnap does not work with bounds HOT 1
- MacOS 15 Xcode build Error HOT 17
- [Bug]: Using `<Images>` with native views on iOS causes touch interation to stop working for part of map
- IOS Transporter Delivery Error HOT 4
- iOS archives have missing dSYMs for Native Mapbox version 11.6.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maps.