[英]Android Studio | Google play services library dependency error
[英]Android Studio project with library module google play services error
我有這么多開發人員做的這個問題:
Error:No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').
我的項目有什么不同,游戲服務依賴來自一個庫(我控制),我把它作為AAR文件包含在內。
圖書館
build.gradle:compile'com.google.android.gms: compile 'com.google.android.gms:play-services-base:10.2.1'
manifest: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
應用項目
頂級構建文件:
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
AAR位於libs
目錄中。
模塊構建文件: compile(name:'app-debug', ext:'aar')
這是唯一的依賴。 我也嘗試過這樣:
compile(name:'app-debug', ext:'aar') {
transitive = true;
}
但沒有變化。 這是基於這個問題,這是我發現的最接近我的情況,但是那個人將依賴項包含為maven工件: 來自aar庫的google_play_services_version值出錯
如果您需要查看其他任何內容,請與我們聯系。
本地aar文件不包含項目的依賴項,因此您應該將庫使用的所有依賴項(包括Google位置服務)手動包含到應用程序的build.gradle文件中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.