问题
My app is crashed with following error,
E/dex2oat: Failed to create oat file:/data/dalvik-cache/arm/data@app@com.stvgame.xiaoy.remote-1@split_lib_dependencies_apk.apk@classes.dex: Permission denied
And our app use mutipule dex, does they have relation?
回答1:
I had a similar problem and my solution was disable the Instant Run, if you're using Android Studio...
回答2:
I had got a similar error when i used multi dex for the first time, This guide helped a lot,
My error was i forgot to add this in the application class:
public class MyApplication extends SomeOtherApplication {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
in your build gradle, make sure you have included the following lines:
android {
defaultConfig {
...
minSdkVersion 15
targetSdkVersion 25
multiDexEnabled true
}
...
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
Even then multi dex has limitations with progaurd, read the guide to find out if that is causing this issue.
来源:https://stackoverflow.com/questions/42827205/app-crashed-wiht-classes-dex-permission-denied-error