app crashed wiht classes.dex permission denied error

谁说胖子不能爱 提交于 2019-12-05 20:38:35

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!