Google 未找到播放服务资源
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"/>
已尝试使用 android target-sdk-version="21"
编译您的项目。
它对我有用。
这可能会解决您的问题
- 右键点击你的项目select Properties -> Select Android
- 在 Project Build Target 下,检查 *Android 6.0 或最新的 API。
- 建造
一件重要的事情:导入库项目时总是复制到您的工作区。
更新:
原因:大部分时间google play service lib access resources from latest API可用。这就是为什么你需要定位到最新的。
这是对我有效的解决方案(几个小时后):
1) 从 "Android SDK Manager" 卸载 Google Play 服务库。它会询问您是否还要删除工作区中的目录。回答"Yes"
2) 从 "Android SDK Manager" 再次下载 Google 播放库,然后按照步骤将其导入您的工作区
3) 为 5.0.1 设置 Android 目标 google-play-services-lib(这些是我工作的版本)
4) 在你要导入的项目中,右键->属性->Android。再次添加 google-play-services-lib 库。
5) 将项目的 Android 目标设置为 5.0.1(与第 3 点相同的情况:我想它可以用于其他版本)
6) 仅在上述解决方案不起作用的情况下,将 android-support-v4.jar 从 <...>/sdk/extras/android/support/v4 复制到 "libs" 文件夹你的项目。
希望对你有用
我通过将 google-play-services_lib
清单中的 minSdkVersion
更改为我的应用程序使用的最低 SDK 版本来修复它。示例:<uses-sdk android:minSdkVersion="14"/>
对于新的 Google Play Services,您需要更改 project.properties
文件中的项目目标(Google Play Services Lib 项目,而不是您的项目):
In the below file:
google-play-services_lib/project.properties
Change the below line
target=**android-9*
to:
target=**android-23**
我已经使用 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"/>
已尝试使用 android target-sdk-version="21"
编译您的项目。
它对我有用。
这可能会解决您的问题
- 右键点击你的项目select Properties -> Select Android
- 在 Project Build Target 下,检查 *Android 6.0 或最新的 API。
- 建造
一件重要的事情:导入库项目时总是复制到您的工作区。
更新:
原因:大部分时间google play service lib access resources from latest API可用。这就是为什么你需要定位到最新的。
这是对我有效的解决方案(几个小时后):
1) 从 "Android SDK Manager" 卸载 Google Play 服务库。它会询问您是否还要删除工作区中的目录。回答"Yes"
2) 从 "Android SDK Manager" 再次下载 Google 播放库,然后按照步骤将其导入您的工作区
3) 为 5.0.1 设置 Android 目标 google-play-services-lib(这些是我工作的版本)
4) 在你要导入的项目中,右键->属性->Android。再次添加 google-play-services-lib 库。
5) 将项目的 Android 目标设置为 5.0.1(与第 3 点相同的情况:我想它可以用于其他版本)
6) 仅在上述解决方案不起作用的情况下,将 android-support-v4.jar 从 <...>/sdk/extras/android/support/v4 复制到 "libs" 文件夹你的项目。
希望对你有用
我通过将 google-play-services_lib
清单中的 minSdkVersion
更改为我的应用程序使用的最低 SDK 版本来修复它。示例:<uses-sdk android:minSdkVersion="14"/>
对于新的 Google Play Services,您需要更改 project.properties
文件中的项目目标(Google Play Services Lib 项目,而不是您的项目):
In the below file:
google-play-services_lib/project.properties
Change the below line
target=**android-9*
to:
target=**android-23**