Closed DerekFei closed 5 years ago
Any solution for above? Facing the same issue.
Same issue here :(
in android/gradle.properties add below two line. in my case solve issue using this.
android.useAndroidX=true
android.enableJetifier=true
in android/gradle.properties add below two line. in my case solve issue using this.
android.useAndroidX=true android.enableJetifier=true
Thanks
Hi, It looks like I have a similar problem as topic started. I have modified graddle.properties as theyasirahmad suggested, but that did not help.
How to reproduce:
yarn install && yarn run start
in example/
foldernpx react-native run-android
as a result I get a lot of errors as above:
ImagePickerModule.java:15: error: package androidx.annotation does not exist
import androidx.annotation.NonNull;
Any ideas?
Genial Funciona 100 Puntos 👍👍 @theyasirahmad Gracias 💪
android.useAndroidX=true android.enableJetifier=true
i get an error like this
Task :react-native-gesture-handler:compileDebugJavaWithJavac
/Users/fandupratamalakuana/test-interview/react-native/<my_folder>/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.java:37: error: cannot find symbol
import androidx.annotation.Nullable;
end then this methods its works
Add the following two flags to true in your gradle.properties file at ProjectFolder/android/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"
https://stackoverflow.com/questions/40380519/error-package-com-android-annotations-does-not-exist
add
implementation("com.google.code.findbugs:jsr305:3.0.2")
to build.gradle.kts
After running react-native run-android This happens
node_modules\react-native-fbsdk\android\src\main\java\com\facebook\reactnative\androidsdk\FBLoginButtonManager.java:62: error: cannot find symbol reactArrayToStringList(@Nullable ReadableArray array) {
^
symbol: class Nullable
location: class Utility
\node_modules\react-native-fbsdk\android\src\main\java\com\facebook\reactnative\androidsdk\Utility.java:306: error: cannot find symbol
public static @Nullable List reactArrayToStringList(@Nullable ReadableArray array) {
^
symbol: class Nullable
location: class Utility
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: node_modules\react-native-fbsdk\android\src\main\java\com\facebook\reactnative\androidsdk\Utility.java uses unchecked or unsafe operations.
public void setDefaultAudience(RCTLoginButton loginButton, @Nullable String defaultAudience) { ^ symbol: class Nullable location: class FBLoginButtonManager node_modules\react-native-fbsdk\android\src\main\java\com\facebook\reactnative\androidsdk\FBLoginButtonManager.java:69: error: cannot find symbol @Nullable ReadableArray publishPermissions) { ^ symbol: class Nullable location: class FBLoginButtonManager \node_modules\react-native-fbsdk\android\src\main\java\com\facebook\reactnative\androidsdk\Utility.java:306: error: cannot find symbol public static @Nullable List
Note: Recompile with -Xlint:unchecked for details. 12 errors
FAILURE: Build failed with an exception.