Android standalone app does not work after upagrading to Expo22


#1

After upgrading to Expo23, my standalone app does not work anymore. Sad to say it went up to production because I thought everything went well, I tested it on Expo Client and everything works normal. My fault is i did not test the generated APK after exp build:android. The google play display the follow stacktrace

java.lang.NoClassDefFoundError: 
 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:219)
 at android.app.Activity.onCreate (Activity.java:1039)
 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:6876)
 at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1135)
 at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3206)
 at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3349)
 at android.app.ActivityThread.access$1100 (ActivityThread.java:221)
 at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1794)
 at android.os.Handler.dispatchMessage (Handler.java:102)
 at android.os.Looper.loop (Looper.java:158)
 at android.app.ActivityThread.main (ActivityThread.java:7224)
 at java.lang.reflect.Method.invoke (Native Method)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
 at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)
Caused by: java.lang.ClassNotFoundException: 
 at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)
 at java.lang.ClassLoader.loadClass (ClassLoader.java:511)
 at java.lang.ClassLoader.loadClass (ClassLoader.java:469)

If anyone can shed a light, i really really appreaciate it. I have to get back to Expo21, because it’s another tedious work for me


#2

hey yes you are right , in my case also my sdk verision is 22 and my addEventListener method for android is not working as expected , it is executing sometimes and sometimes not. But on ios everything is working fine .


#3

Updating to the latest exp cli (45.1.0) fix my problem.