Execution failed for task ':app:transformClassesWithJarMergingForDebug

前端 未结 1 1180
刺人心
刺人心 2021-01-05 11:39

I am created an android app & is running above API level 21. But not running on below API level 21.

Here is error log:

Error:Execution failed for task

相关标签:
1条回答
  • 2021-01-05 12:05

    First Compile the build with

    compile 'com.android.support:multidex:1.0.1'

    In Your AndroidManifest.xml add this lines android:name

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:name="android.support.multidex.MultiDexApplication"
        >
    

    And In your build.gradle also add

    dexOptions {
        //incremental = true;
        preDexLibraries = false
        javaMaxHeapSize "4g"
    }
    
    
    packagingOptions {
         exclude 'META-INF/NOTICE.txt' // will not include NOTICE file
        exclude 'META-INF/LICENSE.txt' // will not include LICENSE file
    }
    
    0 讨论(0)
提交回复
热议问题