proguardRelease的Android错误

时间:2016-01-23 11:56:22

标签: android android-gradle

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. > java.io.IOException: Failed to rename 

当我生成签名的apk时,我得到了上述错误,我清理并重建项目,然后也得到了相同的错误,但是当我把 minifienabled false时,它的工作正常。我认为问题在于buildtools,gradle版本不兼容。可以任何人建议正确配置?有些时候签名的apk是生成的,当我安装和检查时,它崩溃了,有人可以帮忙。

项目build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.1'
        classpath 'com.google.gms:google-services:1.5.0-beta2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

app build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.kitchenvilla.gingerbuds"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 25
        versionName "1.3.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

android {
    useLibrary 'org.apache.http.legacy'
}
android {
    publishNonDefault true
}


dependencies {
    compile 'com.android.support:recyclerview-v7:23.0.0'
    compile 'com.mcxiaoke.volley:library:1.0.15'
    compile 'org.apmem.tools:layouts:1.10@aar'
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:design:23.0.0'
    compile 'com.google.android.gms:play-services-maps:8.3.0'
    compile 'com.google.android.gms:play-services:8.3.0'
    compile 'com.android.support:support-v4:23.0.0'
    compile 'com.pkmmte.view:circularimageview:1.1'
    compile 'com.squareup.picasso:picasso:2.3.2'
    compile 'com.facebook.android:facebook-android-sdk:4.7.0'
    compile project(':libs:viewPager')
}

0 个答案:

没有答案