简体   繁体   中英

Android minifyEnabled true causes app to crash

When I generate an app bundle (release) with minifyEnabled true, when I install the app on a device and run it I get this error:

E/AndroidRuntime: FATAL EXCEPTION: main Process: xxxxxxxxxxxxx PID: 12723 lb at iahac.di(:39) at iahac.de(Unknown Source:10) at fsdi(:4) at lnkaaf(Unknown Source:8) at dai0.run(:2) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.ZC31B32364CE19CA8FC D150A417ECCE58Z.internal.os.ZygoteInit.main(ZygoteInit.java:930)

NB: I edited the original question because Facebook was not the cause of the crash.

It's probably due to proguard rules that are not configured correctly. Check if it works when you add this to your proguard rules:

-keep class com.facebook.** {
   *;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM