![](/img/trans.png)
[英]No Resource found that matches @integer/google_play_service_version
[英]Google play service resource not found
我使用SDK管理器更新SDK,更新SDK“google-play-services_lib”后沒有得到遵守,它顯示以下錯誤。
**extras\google\google_play_services\libproject\google-play-services_lib\res\values-v11\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar'.
extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.
extras\google\google_play_services\libproject\google-play-services_lib\res\values-v11\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar'.
extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.**
任何幫助贊賞。
以下是xml(在“values-v11”下)給出錯誤,
<?xml version="1.0" encoding="utf-8"?>
<!-- Base preview application theme. -->
<style name="Theme.AppInvite.Preview.Base" parent="@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar"/>
這可能會解決您的問題
一件重要的事情:導入庫項目時總是復制到您的工作區。
更新:
原因:大部分時間谷歌播放服務從最新的API訪問資源可用。 這就是你需要瞄准最新目標的原因。
這是它為我工作的解決方案(幾個小時后):
1)從“Android SDK Manager”中取消Google Play服務Lib。 它會詢問您是否還要刪除工作區中的目錄。 回答“是”
2)從“Android SDK Manager”再次下載Google Play Library,然后按照步驟將其導入您的工作區
3)為5.0.1的google-play-services-lib設置Android Target(這些是我工作的版本)
4)在要導入的項目中,右鍵單擊 - > properties-> Android。 再次添加google-play-services-lib庫。
5)將項目的Android Target設置為5.0.1(與第3點相同的情況:我猜它可以用於其他版本)
6)只有在上述解決方案不起作用的情況下,將android-support-v4.jar從<...> / sdk / extras / android / support / v4復制到項目的“libs”文件夾中。
我希望這個對你有用
對於新的Google Play服務,您需要更改project.properties
文件(Google Play Services Lib項目,而不是您的項目)中的項目目標:
在以下文件中:
google-play-services_lib/project.properties
更改以下行
target=**android-9*
至:
target=**android-23**
試圖使用android target-sdk-version="21"
編譯你的項目。 它對我有用。
我通過minSdkVersion
google-play-services_lib
清單中的minSdkVersion
更改為我的應用使用的最低SDK版本來修復它。 示例: <uses-sdk android:minSdkVersion="14"/>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.