Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
728 views
in Technique[技术] by (71.8m points)

android - CommandInvokationFailure error when building 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

I wish to integrate "Leaderboards" in my app using Google Play Services. What should I do to fix this?

What I've tried:

  • 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.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This absolutely will fix your problem.

Download the google_play_services from this link below :

https://dl-ssl.google.com/android/repository/google_play_services_8298000_r28.zip

Then unzip it.

after unzip copy the file to :

android-sdk/extras/google/google_play_services/

Find version.xml file at the zip file:

android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/

and copy it to :

Assets/Plugins/Android/res/values/

At unity folder

This is work for me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...