【发布时间】:2014-11-12 21:24:26
【问题描述】:
我有一个用 Java 编写的 Unity 插件。在这个插件中,我需要获取新的 Google Advertisement ID 才能做到这一点,我必须添加到 Manifest 文件中:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
当我编译时,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 文件夹,但这没有帮助。 让它发挥作用的正确方法是什么?
【问题讨论】:
标签: android plugins unity3d google-play-services