0

how to fix android studio run time issue failed to capture snapshots of output files fortask 'transform classeswithDexForDebug' property 'streamoutputfolder' during updodate checkup

Nayana
  • 1
  • 3
    Possible duplicate of [Android - transform Classes With Dex For Debug](https://stackoverflow.com/questions/36237253/android-transform-classes-with-dex-for-debug) – chirag90 Sep 06 '17 at 07:10
  • Possible duplicate of [Failed to capture snapshot of output files for task](https://stackoverflow.com/questions/43065324/failed-to-capture-snapshot-of-output-files-for-task) – Raghavendra Sep 06 '17 at 07:10
  • refer this [StackOverFlow link](https://stackoverflow.com/questions/36237253/android-transform-classes-with-dex-for-debug#answer-39268997) – Arpit Prajapati Sep 06 '17 at 07:12

2 Answers2

0

check your build.gradle file has following code.

android{
    defaultConfig {

        // Enabling multidex support.
        multiDexEnabled true
    }


    dexOptions {
        javaMaxHeapSize "4g"
    }
}
dependencies {
    //...
    compile 'com.android.support:multidex:1.0.0'
}
Sunil P
  • 3,698
  • 3
  • 13
  • 20
0

enable multidex as following:

android {    
defaultConfig {
    // Enabling multidex support.
    multiDexEnabled true
 }  
}
 dependencies {
 compile 'com.android.support:multidex:1.0.0'
}

create one class like this

public class Multi_Dex extends Application {
 @Override
 protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
 }
}

now in your manifiest file add this

<application
    android:name=".Multi_Dex"
    android:allowBackup="true"
    android:icon="@drawable/logo"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
AskNilesh
  • 67,701
  • 16
  • 123
  • 163