Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

app crashed wiht classes.dex permission denied error

My app is crashed with following error,

 E/dex2oat: Failed to create oat file:/data/dalvik-cache/arm/data@[email protected]@[email protected]: Permission denied

And our app use mutipule dex, does they have relation?

like image 968
happyburglar Avatar asked Mar 16 '17 06:03

happyburglar


2 Answers

I had a similar problem and my solution was disable the Instant Run, if you're using Android Studio...

like image 179
Miller Avatar answered Nov 16 '22 02:11

Miller


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.

like image 23
Harsh Ganatra Avatar answered Nov 16 '22 01:11

Harsh Ganatra