react-native-geolocation
react-native-geolocation copied to clipboard
Task :@react-native-community_geolocation:compileReleaseJavaWithJavac FAILED
Ask your Question
I have trouble when running gradlew assembleRelease: Task :@react-native-community_geolocation:compileReleaseJavaWithJavac FAILED node_modules/@react-native-community/geolocation/android/src/main/java/com/reactnativecommunity/geolocation/GeolocationModule.java:21: error: package androidx.core.content does not exist import androidx.core.content.ContextCompat;
node_modules/@react-native-community/geolocation/android/src/main/java/com/reactnativecommunity/geolocation/GeolocationModule.java:274: error: cannot find symbol int finePermission = ContextCompat.checkSelfPermission(getReactApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION);
the dependencies in my package.json: "@react-native-community/geolocation": "^1.4.2", "react-native": "^0.59.8",
how can I solve this?
did you solve this
I had issues with this. The problem is that v2.0.2
makes the breaking changes of requiring AndroidX libraries, so any old project will fail. The last working version without that is 1.4.2