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

錯誤:任務“:app:transformClassesWithDexForDebug"執行

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

問題描述

錯誤

錯誤:任務 ':app:transformClassesWithDexForDebug' 執行失敗.com.android.build.transform.api.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:進程'命令'/usr/lib/jvm/java-8-oracle/bin/java'' 以非零退出值 1 結束

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

我的應用 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'
}

在調試時,如果我將 minifyEnabled 設置為 true,那么它會編譯.但是,我無法調試我的應用程序.

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

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

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,錯誤是由于添加了太多 Gradle 依賴項引起的,但我可能錯了(我真的希望是錯的,因為所有這些包都非常重要!).

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!).

請幫我解決這個錯誤.非常感謝!

Please help me to resolve this error. Much thanks!

推薦答案

只需更正 Google play 服務依賴項:

Just correct Google play services dependencies:

您的項目中包含所有播放服務.只添加你想要的.

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 服務版本中,您必須編譯整個 API 包到您的應用程序中.在某些情況下,這樣做會使在您的應用程序中保持方法的數量變得更加困難(包括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服務 API 到您的應用程序中.例如,僅包含 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'

可在此處找到完整列表.

這篇關于錯誤:任務“:app:transformClassesWithDexForDebug"執行失敗的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 亚洲精品9999 | 久久综合九色综合欧美狠狠 | 欧美精品中文字幕久久二区 | 国产精品激情 | 中文字幕一区二区三区在线观看 | 日韩字幕一区 | 日韩精品免费视频 | 久久久精品影院 | 日韩电影一区 | 午夜婷婷激情 | 亚洲国产激情 | 激情久久网 | 日韩av一区二区在线观看 | 免费观看的av | 国产精品一区二区不卡 | 亚洲成av人片在线观看无码 | 99久久亚洲| 91视频在线网站 | 亚洲欧洲视频 | 999免费视频| 精品国产乱码久久久 | 免费黄色录像片 | 欧美日韩在线综合 | 国产精品成人在线 | 日日爱av| 亚洲国产精品日韩av不卡在线 | 黄色一级电影在线观看 | 国产农村一级片 | a级毛片免费高清视频 | 久草电影网 | 888久久久 | 亚洲视频一区二区三区 | 欧美精品福利视频 | 久久一区精品 | 黄频视频 | 免费一级片 | 亭亭五月激情 | 久久综合一区 | 精品国产一区二区三区av片 | 台湾佬久久| 影视先锋av资源噜噜 |