rnmapbox / maps

A Mapbox react native module for creating custom maps
MIT License
2.22k stars 838 forks source link

Execution failed for task ':rnmapbox_maps:compileDebugJavaWithJavac' #2220

Closed MagdaHennebo closed 2 years ago

MagdaHennebo commented 2 years ago

Environment

Steps to reproduce

I have a react native project with the mapbox lib for react native : "@rnmapbox/maps": "rnmapbox/maps#main".

When I run : npx react-native run-android

I get this error : Execution failed for task ':rnmapbox_maps:compileDebugJavaWithJavac'.

More details :

                    > Task :rnmapbox_maps:compileDebugJavaWithJavac FAILED

                    Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

                    You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

                    See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
                    121 actionable tasks: 2 executed, 119 up-to-date
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2116: error: cannot find symbol
                            layer.fillExtrusionAmbientOcclusionIntensity(styleValue.getExpression());
                                 ^
                      symbol:   method fillExtrusionAmbientOcclusionIntensity(Expression)
                      location: variable layer of type FillExtrusionLayer
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2118: error: cannot find symbol
                              layer.fillExtrusionAmbientOcclusionIntensity(styleValue.getFloat(VALUE_KEY));
                                   ^
                      symbol:   method fillExtrusionAmbientOcclusionIntensity(float)
                      location: variable layer of type FillExtrusionLayer
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2126: error: cannot find symbol
                            layer.fillExtrusionAmbientOcclusionIntensityTransition(transition);
                                 ^
                      symbol:   method fillExtrusionAmbientOcclusionIntensityTransition(StyleTransition)
                      location: variable layer of type FillExtrusionLayer
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2132: error: cannot find symbol
                            layer.fillExtrusionAmbientOcclusionRadius(styleValue.getExpression());
                                 ^
                      symbol:   method fillExtrusionAmbientOcclusionRadius(Expression)
                      location: variable layer of type FillExtrusionLayer
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2134: error: cannot find symbol
                              layer.fillExtrusionAmbientOcclusionRadius(styleValue.getFloat(VALUE_KEY));
                                   ^
                      symbol:   method fillExtrusionAmbientOcclusionRadius(float)
                      location: variable layer of type FillExtrusionLayer
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2142: error: cannot find symbol
                            layer.fillExtrusionAmbientOcclusionRadiusTransition(transition);
                                 ^
                      symbol:   method fillExtrusionAmbientOcclusionRadiusTransition(StyleTransition)
                      location: variable layer of type FillExtrusionLayer
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2554: error: cannot find symbol
                            layer.rangeTransition(transition);
                                 ^
                      symbol:   method rangeTransition(StyleTransition)
                      location: variable layer of type Atmosphere
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2570: error: cannot find symbol
                            layer.colorTransition(transition);
                                 ^
                      symbol:   method colorTransition(StyleTransition)
                      location: variable layer of type Atmosphere
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2586: error: cannot find symbol
                            layer.highColorTransition(transition);
                                 ^
                      symbol:   method highColorTransition(StyleTransition)
                      location: variable layer of type Atmosphere
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2602: error: cannot find symbol
                            layer.spaceColorTransition(transition);
                                 ^
                      symbol:   method spaceColorTransition(StyleTransition)
                      location: variable layer of type Atmosphere
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2618: error: cannot find symbol
                            layer.horizonBlendTransition(transition);
                                 ^
                      symbol:   method horizonBlendTransition(StyleTransition)
                      location: variable layer of type Atmosphere
                    /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java:2634: error: cannot find symbol
                            layer.starIntensityTransition(transition);
                                 ^
                      symbol:   method starIntensityTransition(StyleTransition)
                      location: variable layer of type Atmosphere
                    Note: Some input files use or override a deprecated API.
                    Note: Recompile with -Xlint:deprecation for details.
                    Note: /Users/[...]/node_modules/@rnmapbox/maps/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/sources/RCTMGLTileSourceManager.java uses unchecked or unsafe operations.
                    Note: Recompile with -Xlint:unchecked for details.
                    12 errors

                    FAILURE: Build failed with an exception.

                    * What went wrong:
                    Execution failed for task ':rnmapbox_maps:compileDebugJavaWithJavac'.
                    > Compilation failed; see the compiler error output for 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

                    BUILD FAILED in 39s 

I am fairly new to Mapbox, and I need help figuring out where the issue comes from. I have scrupulously followed the different environment set-up tutorials (for react native and mapbox) and I wonder how I can solve this unfortunate issue.

Thanks in advance for the help.

mfazekas commented 2 years ago

Did you happen to customize the used libraries?! Do you have RNMapboxMapsLibs set in one of your gradle files?! If so make sure they are later than what we build with (1.8.0).

See: https://github.com/rnmapbox/maps/blob/main/android/install.md#custom-versions