Application stops working on android

@davidbova I’m on SDK19, so I think downgrade will do anything

1 Like

@kilhog thank you for this

1 Like

Tried on sdk21. Same

1 Like

Joining the choir on this one.

SDK 22.x.x building for Android.

My stack trace:

java.lang.NoClassDefFoundError: Failed resolution of: Lbolts/AppLinks;
	at com.facebook.appevents.internal.SourceApplicationInfo$Factory.create(SourceApplicationInfo.java:131)
	at com.facebook.appevents.internal.ActivityLifecycleTracker.onActivityCreated(ActivityLifecycleTracker.java:131)
	at com.facebook.appevents.internal.ActivityLifecycleTracker$1.onActivityCreated(ActivityLifecycleTracker.java:77)
	at android.app.Application.dispatchActivityCreated(Application.java:195)
	at android.app.Activity.onCreate(Activity.java:918)
	at android.support.v4.app.i.onCreate(BaseFragmentActivityGingerbread.java:54)
	at android.support.v4.app.p.onCreate(FragmentActivity.java:319)
	at host.exp.exponent.experience.d.onCreate(ReactNativeActivity.java:130)
	at host.exp.exponent.experience.a.onCreate(BaseExperienceActivity.java:58)
	at host.exp.exponent.experience.ExperienceActivity.onCreate(ExperienceActivity.java:110)
	at host.exp.exponent.experience.ShellAppActivity.onCreate(ShellAppActivity.java:20)
	at android.app.Activity.performCreate(Activity.java:6237)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
	at android.app.ActivityThread.-wrap11(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5417)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "bolts.AppLinks" on path: DexPathList[[zip file "/data/app/dk.XYZ/base.apk"],nativeLibraryDirectories=[/data/app/dk.XYZ/lib/x86, /data/app/dk.XYZ/base.apk!/lib/x86, /vendor/lib, /system/lib]]
	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
	... 23 more
	Suppressed: java.lang.ClassNotFoundException: bolts.AppLinks
		at java.lang.Class.classForName(Native Method)
		at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
		at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
		... 24 more
	Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
1 Like

I have same problem and there are others reporting about this problem in expo developers slack channel.

1 Like

Same issue, glad it’s not just me

1 Like

Hey everyone, this should be fixed now. You’ll have to re-run exp build to get a new APK. Let me know if it still fails for you after trying again.

5 Likes

Thank you @jesse ! :clap:

I have a weird problem now.
I build the .apk with exp build:android, transfer the file to my phone and installs. The application works perfectly.

But, if I publish through Google Play (same .apk), and download and installs via Google Play, the application crashes on load. Before the application crashes, it does load up and I see the first screen and the application asks for permission to access the camera (this is expected), however, before I can press ‘accept’, the application crashes.

It works now! Thanks! @jesse

Thanks @jesse. It works now.

I can confirm that it works now after upgrading of exp cli to 45.1.0

mine is still failing , same error but i have detached my project from expo

sorted for me - thank you again @jesse

My build is failing as well. Can’t run exp build because my project is detached.

[exp] exp build is not supported for detached projects.

I can confirm that it works after adding the following to build.gradle to a detached build.

dependencies {
    compile 'com.parse.bolts:bolts-android:1.1.3'
}

I added this snippet posted by @rintoj

dependencies {
    compile 'com.parse.bolts:bolts-android:1.1.3'
}

This allows our app to be assembled in debug mode, but now our release build fails with this error:

:app:mergeMainReleaseAssets
> Building 95%
> :app:transformClassesWithJarMergingForMainRelease:app:transformClassesWithJarMergingForMainRelease FAILED
> Building 95%
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForMainRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: bolts/AggregateException.class

@jesse You mentioned “this should be fixed” – would you mind sharing the root cause of the issue?

You need to remove the exclude module block from compile 'com.facebook.android:facebook-android-sdk:4.+'

1 Like

Now!!

$ create-react-native-app sample
$ cd sample
$ yarn run eject
$ cd android
$ ./gradlew assembleDebug

and Deploy -> bolts.AppLinks Error!!
When will it be fixed?
Please…

@jesse
Hi I had same problem and seems to fix it after applying your example.
But now I am facing another error message.

1528

Do you have any idea?

this kind of error is really frustrating.