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

commons-logging 定義了與 Android Studio 更新后 Android

commons-logging defines classes that conflict with classes now provided by Android after Android Studio Update(commons-logging 定義了與 Android Studio 更新后 Android 現(xiàn)在提供的類沖突的類) - IT屋-程序員軟件開發(fā)技術(shù)分
本文介紹了commons-logging 定義了與 Android Studio 更新后 Android 現(xiàn)在提供的類沖突的類的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我已將 Android Studio 更新到版本 3,現(xiàn)在似乎無法編譯我之前編譯的項(xiàng)目而沒有錯誤.

I have updated Android Studio to version 3 and now seems unable to compile my project previously compiled without errors.

錯誤信息如下

Error:Error: commons-logging 定義的類與現(xiàn)在由 Android 提供的類.解決方案包括尋找更新的沒有相同問題的版本或替代庫(例如,對于 httpclient 使用 HttpUrlConnection 或 okhttp 代替),或使用 jarjar 之類的東西重新打包庫.[重復(fù)平臺類]

Error:Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]

依賴關(guān)系是

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:27.0.0'
    compile 'com.android.support:design:27.0.0'
    compile 'com.google.api-client:google-api-client-android:1.23.0' exclude module: 'httpclient'
    compile 'com.google.http-client:google-http-client-gson:1.23.0' exclude module: 'httpclient'
    compile 'com.google.firebase:firebase-core:11.4.2'
}

錯誤似乎是由

compile 'com.google.api-client:google-api-client-android:1.23.0' exclude module: 'httpclient'
compile 'com.google.http-client:google-http-client-gson:1.23.0' exclude module: 'httpclient'

我已經(jīng)在使用 exclude module: 'httpclient'那么為什么它不編譯?這是 Android Studio 3 的錯誤和或包含 com.android.tools.build:gradle:3.0.0 插件還是我遺漏了什么?與以前的版本編譯完全一樣的項(xiàng)目沒問題.

I already use exclude module: 'httpclient' So why It doesn't compile? Is this a bug of Android Studio 3 andor included com.android.tools.build:gradle:3.0.0 plugin or I'm missing something? With the previous version no problem to compile exactly the same project.

推薦答案

添加到應(yīng)用模塊中的 build.gradle

Add to build.gradle located in app module

configurations {
    all {
        exclude module: 'httpclient'
    }
}

這篇關(guān)于commons-logging 定義了與 Android Studio 更新后 Android 現(xiàn)在提供的類沖突的類的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(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;在“清單中找到錯誤?)
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 庫的傳遞依賴)
主站蜘蛛池模板: 国产高清一区二区三区 | 无吗视频 | 国产亚洲一区二区在线观看 | 日韩二区三区 | 在线亚州| 国产欧美在线一区 | 蜜臀久久| av在线播放一区二区 | 午夜精品久久久久久久久久久久 | 久久久人成影片免费观看 | 国产精品久久777777 | 日韩一二区在线观看 | 欧美日韩一区精品 | 不卡一二区 | 国产亚洲一区二区三区 | 成人精品国产 | 国产三区精品 | 99re在线播放 | 第一福利社区1024 | 欧美一级欧美一级在线播放 | 成人一区二区三区在线 | 国产视频一视频二 | 国产精品视频久久久久久 | 一区二区中文字幕 | 免费a大片 | 国户精品久久久久久久久久久不卡 | 国产亚洲成av人在线观看导航 | 高清久久久 | 福利片一区二区 | 亚洲黄色国产 | 午夜国产 | 鸳鸯谱在线观看高清 | 亚洲国产成人av好男人在线观看 | 久久精品成人 | 久久精品久久久 | 久久一热| 日本不卡一区二区三区在线观看 | 国产日韩精品一区 | 国产免费播放视频 | 亚洲视频在线一区 | 产真a观专区 |