We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I recently updated react native and RN android location enabler but I get this error when I run the project:
=========================================
Task :react-native-android-location-enabler:compileDebugJavaWithJavac FAILED ...\node_modules\react-native-android-location-enabler\android\src\main\java\com\heanoria\library\reactnative\locationenabler\RNAndroidLocationEnablerModule.java:8: error: package androidx.annotation does not exist import androidx.annotation.NonNull; ^ ...\node_modules\react-native-android-location-enabler\android\src\main\java\com\heanoria\library\reactnative\locationenabler\RNAndroidLocationEnablerModule.java:98: error: cannot find symbol public void onComplete(@nonnull Task task) { ^ symbol: class NonNull location: class RNAndroidLocationEnablerModule 2 errors
"react": "^16.10.1", "react-native": "0.57.8", "react-native-android-location-enabler": "^1.2.0",
Anyone knows how to fix it?
The text was updated successfully, but these errors were encountered:
This works for me:
Add the following two flags to true in your gradle.properties file at ProjectFolder/android/gradle.properties
gradle.properties
android.useAndroidX=true android.enableJetifier=true
Execute
npm install --save-dev jetifier npx jetify npx react-native run-android
In your package.json add the following to scripts "postinstall" : "npx jetify"
"postinstall" : "npx jetify"
Extra: At ProjectFolder/android delete .idea folder in case that cache it's causing a trouble.
ProjectFolder/android
.idea
Original Solution Source: At Pavan Garre response: https://stackoverflow.com/questions/40380519/error-package-com-android-annotations-does-not-exist
Sorry, something went wrong.
For versions ReactNative < 0.60.0, please use [email protected]
No branches or pull requests
I recently updated react native and RN android location enabler but I get this error when I run the project:
=========================================
FAILURE: Build failed with an exception.
"react": "^16.10.1",
"react-native": "0.57.8",
"react-native-android-location-enabler": "^1.2.0",
Anyone knows how to fix it?
The text was updated successfully, but these errors were encountered: