久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

錯(cuò)誤:任務(wù)“:app:transformClassesWithDexForDebug"執(zhí)行

Error:Execution failed for task #39;:app:transformClassesWithDexForDebug#39;(錯(cuò)誤:任務(wù)“:app:transformClassesWithDexForDebug執(zhí)行失敗)
本文介紹了錯(cuò)誤:任務(wù)“:app:transformClassesWithDexForDebug"執(zhí)行失敗的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

錯(cuò)誤

錯(cuò)誤:任務(wù) ':app:transformClassesWithDexForDebug' 執(zhí)行失敗.com.android.build.transform.api.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:進(jìn)程'命令'/usr/lib/jvm/java-8-oracle/bin/java'' 以非零退出值 1 結(jié)束

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.transform.api.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1

我的應(yīng)用 gradle 文件:

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

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId 'Hidden application ID'
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        disable 'InvalidPackage'
    }
    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
    }
    productFlavors {
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:cardview-v7:23.1.1'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.mcxiaoke.volley:library-aar:1.0.0'
    compile 'com.google.android.gms:play-services:8.1.0'
    compile 'com.facebook.android:facebook-android-sdk:4.7.0'
    compile 'com.googlecode.libphonenumber:libphonenumber:7.2.1'
    compile 'com.getbase:floatingactionbutton:1.10.1'
    compile 'com.android.support:preference-v7:23.1.1'
}

在調(diào)試時(shí),如果我將 minifyEnabled 設(shè)置為 true,那么它會(huì)編譯.但是,我無法調(diào)試我的應(yīng)用程序.

While debugging, if I set minifyEnabled to true, then it compiles. However, then I cannot debug my application.

我檢查了另一個(gè)問題:任務(wù)執(zhí)行失敗:app:transformClassesWithDexForDebug' 在為 Android 實(shí)施 Google 登錄時(shí),但只有一個(gè)答案,不幸的是,實(shí)施它并不能解決問題.

I checked this other question: Execution failed for task ':app:transformClassesWithDexForDebug' while implementing Google sign in for Android, but there is only one answer and implementing it does not resolve the issue unfortunately.

AFAIK,錯(cuò)誤是由于添加了太多 Gradle 依賴項(xiàng)引起的,但我可能錯(cuò)了(我真的希望是錯(cuò)的,因?yàn)樗羞@些包都非常重要!).

AFAIK, the error is caused due to addition of too many Gradle dependencies, but I may be wrong (I really hope to be wrong because all these packages are really important!).

請(qǐng)幫我解決這個(gè)錯(cuò)誤.非常感謝!

Please help me to resolve this error. Much thanks!

推薦答案

只需更正 Google play 服務(wù)依賴項(xiàng):

Just correct Google play services dependencies:

您的項(xiàng)目中包含所有播放服務(wù).只添加你想要的.

You are including all play services in your project. Only add those you want.

例如,如果您只使用地圖和 g+ 登錄,則更改

For example , if you are using only maps and g+ signin, than change

 compile 'com.google.android.gms:play-services:8.1.0'

compile 'com.google.android.gms:play-services-maps:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'

來自文檔:

在 6.5 之前的 Google Play 服務(wù)版本中,您必須編譯整個(gè) API 包到您的應(yīng)用程序中.在某些情況下,這樣做會(huì)使在您的應(yīng)用程序中保持方法的數(shù)量變得更加困難(包括65,536 下的框架 API、庫方法和您自己的代碼)限制.

In versions of Google Play services prior to 6.5, you had to compile the entire package of APIs into your app. In some cases, doing so made it more difficult to keep the number of methods in your app (including framework APIs, library methods, and your own code) under the 65,536 limit.

從 6.5 版開始,您可以選擇性地編譯 Google Play服務(wù) API 到您的應(yīng)用程序中.例如,僅包含 GoogleFit 和 Android Wear API,在您的build.gradle 文件:
使用這些行編譯 'com.google.android.gms:play-services:8.3.0'
:

From version 6.5, you can instead selectively compile Google Play service APIs into your app. For example, to include only the Google Fit and Android Wear APIs, replace the following line in your build.gradle file:
compile 'com.google.android.gms:play-services:8.3.0'
with these lines:

編譯'com.google.android.gms:play-services-fitness:8.3.0'
編譯'com.google.android.gms:play-services-wearable:8.3.0'

compile 'com.google.android.gms:play-services-fitness:8.3.0'
compile 'com.google.android.gms:play-services-wearable:8.3.0'

可在此處找到完整列表.

這篇關(guān)于錯(cuò)誤:任務(wù)“:app:transformClassesWithDexForDebug"執(zhí)行失敗的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現(xiàn) IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當(dāng)前風(fēng)味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復(fù)“意外元素lt;查詢gt;在“清單中找到錯(cuò)誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風(fēng)味庫的多風(fēng)味應(yīng)用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運(yùn)行時(shí)有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 羞羞视频网页 | 国产不卡在线 | 国产精品地址 | 亚洲精品视频在线观看免费 | 色综合一区二区 | 国产综合久久久 | 欧美成年人视频在线观看 | 久久久国产一区二区三区四区小说 | 日日摸日日碰夜夜爽亚洲精品蜜乳 | 91免费在线看 | 欧美日韩在线免费观看 | 野狼在线社区2017入口 | 成人免费在线 | 成人免费视频在线观看 | 中文字幕一区二区三区日韩精品 | 人人玩人人添人人澡欧美 | 亚洲国产成人精品女人久久久野战 | 欧美激情亚洲激情 | 国产日产欧产精品精品推荐蛮挑 | 亚洲三级在线观看 | 午夜小影院 | 精品免费观看 | 一区二区免费在线视频 | 妞干网福利视频 | 亚洲欧美国产精品一区二区 | 久久99深爱久久99精品 | 日韩精品 | 午夜久久久久久久久久一区二区 | 成人免费视频网站在线观看 | 91看片在线观看 | 中文字幕蜜臀av | 成人日批视频 | 国产精品乱码一区二区三区 | 逼逼网 | 91不卡| 免费视频一区二区 | 国产我和子的乱视频网站 | 欧美黄色性生活视频 | 亚洲天堂男人的天堂 | 国产精品污www在线观看 | 国产线视频精品免费观看视频 |