我有一个用Java编写的Unity插件.在这个插件中,我需要获取新的Google 广告ID才能执行此操作,我必须添加到Manifest文件中:
当我编译时,Unity会抛出错误:
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details. /Applications/adt/sdk/build-tools/android-4.2.2/aapt package --auto-add-overlay -v -f -m - J gen -M AndroidManifest.xml -S "res" -I "/Applications/adt/sdk/platforms/android- 19/android.jar" -F bin/resources.ap_ stderr[ AndroidManifest.xml:21: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version'). ]
我还尝试将Google Play服务jar添加到[lugins/Androif文件夹但是没有帮助.使它运作的正确方法是什么?
要修复此错误,您必须将version.xml
文件复制android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/
到Assets/Plugins/Android/res/values/
Unity项目的文件夹中.