Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android MultiDex app crashing on low APIs on Android Studio 3.0

I was trying to run an app that requires MultiDex using Android Studio 3.0 on an API 16 device and when the app is finally trying to launch, it crashes. The same occurs on other low APIs (eg.: 17, 18, 19)

But, when I tried to run the app using the Android Studio 3.1 (beta version), no crashes occur.

Is there any way this crash can be fixed?

   FATAL EXCEPTION: main
  java.lang.ExceptionInInitializerError
      at android.support.multidex.MultiDexApplication.<init>(MultiDexApplication.java:35)
      at MY_APP_PATH.MY_CUSTOM_APPLICATION_CLASS.<init>(MY_CUSTOM_APP_CLASS.java:23)
      at java.lang.Class.newInstanceImpl(Native Method)
      at java.lang.Class.newInstance(Class.java:1319)
      at android.app.Instrumentation.newApplication(Instrumentation.java:997)
      at android.app.Instrumentation.newApplication(Instrumentation.java:982)
      at android.app.LoadedApk.makeApplication(LoadedApk.java:496)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4170)
      at android.app.ActivityThread.access$1400(ActivityThread.java:134)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
      at android.os.Handler.dispatchMessage(Handler.java:99)
      at android.os.Looper.loop(Looper.java:137)
      at android.app.ActivityThread.main(ActivityThread.java:4867)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:511)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
      at dalvik.system.NativeStart.main(Native Method)
   Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1306]:  1674 cannot locate '__isnanf'...

      at java.lang.Runtime.loadLibrary(Runtime.java:370)
      at java.lang.System.loadLibrary(System.java:535)
      at com.android.tools.profiler.support.ProfilerService.<clinit>(ProfilerService.java:41)
      at android.support.multidex.MultiDexApplication.<init>(MultiDexApplication.java:35) 
      at MY_APP_PATH.MY_CUSTOM_APPLICATION_CLASS.<init>(MY_CUSTOM_APPLICATION_CLASS.java:23) 
      at java.lang.Class.newInstanceImpl(Native Method) 
      at java.lang.Class.newInstance(Class.java:1319) 
      at android.app.Instrumentation.newApplication(Instrumentation.java:997) 
      at android.app.Instrumentation.newApplication(Instrumentation.java:982) 
      at android.app.LoadedApk.makeApplication(LoadedApk.java:496) 
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4170) 
      at android.app.ActivityThread.access$1400(ActivityThread.java:134) 
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278) 
      at android.os.Handler.dispatchMessage(Handler.java:99) 
      at android.os.Looper.loop(Looper.java:137) 
      at android.app.ActivityThread.main(ActivityThread.java:4867) 
      at java.lang.reflect.Method.invokeNative(Native Method) 
      at java.lang.reflect.Method.invoke(Method.java:511) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774) 
      at dalvik.system.NativeStart.main(Native Method) 
like image 311
Augusto Carmo Avatar asked Nov 25 '25 22:11

Augusto Carmo


1 Answers

Issue should be about enabling "advanced profiling" feature in AS 3.0, if you've done so just disable it:

  • Go to "Edit Configurations...",
  • Select your app configuration under "Android App",
  • Then go "Profiling" tab and
  • Uncheck "Enable advanced profiling"

Problem should be gone.

like image 121
CanC Avatar answered Nov 27 '25 10:11

CanC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!