Android Library Crash On Start Multidex
I've built an android library ( a custom button of sorts ) and uploaded it to my JFrog Artifactory now i tried testing it in an example app (really simple one with default activit
Solution 1:
try to add to android section:
dexOptions { javaMaxHeapSize "2g" }
also, check if you change from api 19 to api 21, if the problem disappear.
Solution 2:
Try adding this to your class which extends Application
.
@OverrideprotectedvoidattachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
Adding multiDexEnabled true
is not enough for it to actually work.
EDIT:
There are other options if this does not suit you:
Adding it via AndroidManifest.xml
:
<applicationandroid:name="android.support.multidex.MultiDexApplication" >
...
</application>
Or, instead of extendig Application
, extend MultiDexApplication
:
publicclassMyApplicationextendsMultiDexApplication { ... }
Solution 3:
It happens when one or more of the 3 party libraries isn't build as expected. Try checking whether there are newer versions of those libraries
Post a Comment for "Android Library Crash On Start Multidex"