91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

解決Android studio 2.3升級到Android studio 3.0 后apt報錯問題

發布時間:2020-09-16 19:59:42 來源:腳本之家 閱讀:191 作者:哈特中尉 欄目:移動開發

1.現象描述

原來項目在Android studio 2.3一切正常,升級3.0之后報如下錯誤:

Error:Cannot choose between the following configurations of project :android_sdk:
 - debugApiElements
 - debugRuntimeElements
 - releaseApiElements
 - releaseRuntimeElements
All of them match the consumer attributes:
 - Configuration 'debugApiElements':
   - Found com.android.build.api.attributes.BuildTypeAttr 'debug' but wasn't required.
   - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required.
   - Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but wasn't required.
   - Found org.gradle.api.attributes.Usage 'java-api' but wasn't required.
 - Configuration 'debugRuntimeElements':
   - Found com.android.build.api.attributes.BuildTypeAttr 'debug' but wasn't required.
   - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required.
   - Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but wasn't required.
   - Found org.gradle.api.attributes.Usage 'java-runtime' but wasn't required.
 - Configuration 'releaseApiElements':
   - Found com.android.build.api.attributes.BuildTypeAttr 'release' but wasn't required.
   - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required.
   - Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but wasn't required.
   - Found org.gradle.api.attributes.Usage 'java-api' but wasn't required.
 - Configuration 'releaseRuntimeElements':
   - Found com.android.build.api.attributes.BuildTypeAttr 'release' but wasn't required.
   - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required.
   - Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but wasn't required.
   - Found org.gradle.api.attributes.Usage 'java-runtime' but wasn't required.

2.解決辦法:

project的build.gradle文件中刪除

classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

module的build.gradle文件中刪除

apply plugin: 'com.neenbedankt.android-apt'

module的build.gradle文件中替換

//apt 'com.jakewharton:butterknife-compiler:8.0.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.0.1'

ps:下面再給大家補充介紹android studio更新到3.0后,不支持apt問題

android studio更新到3.0后,不支持apt了,適配僅需要修改以下兩點:

1.移除module目錄下的build.gradle中的 apply plugin: 'android-apt' 

2.將apt改成annotationProcessor

例如:

apt 'com.google.dagger:dagger-compiler:2.0.2'

改成

annotationProcessor 'com.google.dagger:dagger-compiler:2.0.2'

總結

以上所述是小編給大家介紹的解決Android studio 2.3升級到Android studio 3.0 后apt報錯問題,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對億速云網站的支持!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

米泉市| 瑞昌市| 平顶山市| 乃东县| 阜宁县| 封丘县| 菏泽市| 黎川县| 黑龙江省| 黄大仙区| 揭西县| 闽侯县| 西贡区| 新泰市| 承德县| 中江县| 舟曲县| 赤城县| 平阳县| 海南省| 陇南市| 兰州市| 龙口市| 遂昌县| 响水县| 杭锦后旗| 六安市| 长岭县| 沅江市| 郯城县| 淮滨县| 五大连池市| 鸡东县| 土默特右旗| 客服| 子洲县| 开原市| 肥乡县| 贞丰县| 沈阳市| 青海省|