Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
723 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...