生成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:\Users\Me\AppData\Local\Android\sdk\build-tools\24.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/Me/AppData/Local/Android/sdk\platforms\android-24\android.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支持存储库"和"Extras/Google存储库"的最新版本.
- 在SDK Manager中安装了所有内容.请参见此处.
- 更新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
然后解压缩它.
解压缩文件后,将其复制到:
after unzip copy the file to :
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屋!