构建 APK 时出现 CommandInvokationFailure 错误? [英] CommandInvokationFailure error when building APK?
问题描述
我在构建 APK 时遇到以下错误:
I'm getting the following error when I build my APK:
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:UsersMeAppDataLocalAndroidsdkuild-tools24.0.0aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/Me/AppData/Local/Android/sdkplatformsandroid-24android.jar" -F bin/resources.ap_ --extra-packages
我希望使用 Google Play 服务在我的应用中集成排行榜".我该怎么做才能解决这个问题?
I wish to integrate "Leaderboards" in my app using Google Play Services. What should I do to fix this?
我尝试过的:
- 重新安装 Google Play 服务插件.
- 更新 SDK:请参阅此处.(告诉我我做的是否正确).
- 确保我拥有最新版本的Extras/Android Support Repository"和Extras/Google Repository".
- 在 SDK 管理器中安装所有内容.请参阅此处.
- 正在更新 Unity.
- 正在重新启动.
- 一些细微的变化.
- Reinstalling the Google Play Services plugin.
- Updating SDK: See here. (tell me if I did it properly).
- Made sure I have latest versions of "Extras/Android Support Repository" and "Extras/Google Repository".
- Installed everything in SDK Manager. See here.
- Updating Unity.
- Restarting.
- Few minor changes.
推荐答案
这绝对可以解决您的问题.
This absolutely will fix your problem.
从此链接下载 google_play_services :
Download the google_play_services from this link below :
https://dl-ssl.google.com/android/repository/google_play_services_8298000_r28.zip
然后解压.
解压后复制文件到:
android-sdk/extras/google/google_play_services/
android-sdk/extras/google/google_play_services/
在 zip 文件中找到 version.xml 文件:
Find version.xml file at the zip file:
android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/
android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/
并将其复制到:
资产/插件/Android/res/values/
Assets/Plugins/Android/res/values/
在统一文件夹
这对我有用.
这篇关于构建 APK 时出现 CommandInvokationFailure 错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!