Skip to content
New issue

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

Failed resolution of: Lcom/facebook/infer/annotation/Assertions; #20433

Closed
2 of 3 tasks
NameFILIP opened this issue Jul 28, 2018 · 5 comments
Closed
2 of 3 tasks

Failed resolution of: Lcom/facebook/infer/annotation/Assertions; #20433

NameFILIP opened this issue Jul 28, 2018 · 5 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@NameFILIP
Copy link

NameFILIP commented Jul 28, 2018

Environment

Environment:
OS: macOS High Sierra 10.13.6
Node: 8.11.2
Yarn: 1.7.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.1 AI-173.4819257

Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: 0.55.4 => 0.55.4

Description

The app used to work, but doesn't launch right now without any code changes.
The error I found using adb logcat *:E is:

07-27 17:50:46.454 21556 21556 E AndroidRuntime: FATAL EXCEPTION: main
07-27 17:50:46.454 21556 21556 E AndroidRuntime: Process: com.placesmobile, PID: 21556
07-27 17:50:46.454 21556 21556 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/infer/annotation/Assertions;
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:90)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:45)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:88)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:77)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:52)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7174)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:105)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6938)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.infer.annotation.Assertions" on path: DexPathList[[zip file "/data/app/com.placesmobile-eQv3ZITT0OuZx91A0MpfOA==/base.apk"],nativeLibraryDirectories=[/data/app/com.placesmobile-eQv3ZITT0OuZx91A0MpfOA==/lib/arm, /data/app/com.placesmobile-eQv3ZITT0OuZx91A0MpfOA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
07-27 17:50:46.454 21556 21556 E AndroidRuntime: 	... 17 more

Any ideas why com.facebook.infer.annotation.Assertions is not there?

@gengjiawen
Copy link
Contributor

If you are using instant run, you can try a clean build.

@react-native-bot
Copy link
Collaborator

Have you been able to reproduce this on the latest release, 0.56?

@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Aug 17, 2018
@webdevbyjoss
Copy link

webdevbyjoss commented Dec 14, 2018

Hi @NameFILIP, I'm facing the same issue with my React Native app Android builds after the update to latest ExpoKit 31. Not exactly sure where it comes from, as nothing changed actually in Gradle build scripts. Were you able to fix the issue?

UPDATE: For those who were looking for a solution, meanwhile adding the compile 'com.facebook.infer.annotation:infer-annotation:+' into dependencies { ... } section of build.gradle from the module helped.

@truongngoctuan
Copy link

the above comment magically worked for me, my case, I edited build.gradle of react-native-gesture-handler

@facebook facebook locked as resolved and limited conversation to collaborators Aug 17, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants