Error:Execution failed for task ':app:mergeDebugResources'解决办法

异常原因:资源合并发生错误,drawable使用的图片资源有问题

解决办法:在build.gradle中·添加

 aaptOptions.cruncherEnabled = false
 aaptOptions.useNewCruncher = false

两行代码即可

添加完效果如下

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    aaptOptions.cruncherEnabled = false
    aaptOptions.useNewCruncher = false
    defaultConfig {
        applicationId "com.example.kim.listview"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

 

你可能感兴趣的:(西瓜---Studio错误,橘子---圆又圆)