简体   繁体   中英

Error while Clicking on Build APK using Android Studio

After Clean Project , clicking Rebuild Project , working correctly without any single error/warning and even when i run using my phone as emulator, running properly

But When I click on Build APK , it shown following error, stucked since last three days but could not getting out of it.

Showing:

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForDebug'. Job failed, see logs for details

错误屏幕截图

build.gradle :

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion '24.0.1'
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId 'veri.solo.appoo'
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 6
        versionName '6.4'
        multiDexEnabled true
    }
    aaptOptions {
        cruncherEnabled = false
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }
        debug {
            minifyEnabled true
            debuggable true
            jniDebuggable false
            renderscriptDebuggable false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }
    }

    productFlavors {
    }
    sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
/*
    dexOptions {
        incremental true
    }*/
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile files('libs/FDxSDKProAndroid.jar')
    compile files('libs/android-support-v13.jar')
    compile 'com.android.support:appcompat-v7:24.2.0'
    compile 'com.android.support:design:24.2.0'
    compile 'com.android.support:support-v4:24.2.0'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.android.gms:play-services:10.0.1'
    compile 'com.google.firebase:firebase-core:10.0.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
}
apply plugin: 'com.google.gms.google-services'

in your build that gradle, replace your debug config with this

debug {
            minifyEnabled false
            debuggable true
            jniDebuggable false
            renderscriptDebuggable false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }

you have to do... 你必须要做的...

Check and let me know

I have resolved this issue finally. I removed the physical file from directory app > support-v13.jar and added android-support-v13 in build-gradle dependancy and just clean and rebuild project . Now its set.

Thanks to all who supported me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM