Unity 5 Admob Google 播放服务问题 - 重复 prettify.js

Unity 5 Admob Google Play Service Issue - duplicated prettify.js

我目前正在做一个 Unity/Android 项目。为了集成 admob,我遵循了本教程:

https://developers.google.com/admob/games?hl=en#requirements

有时向导会告诉我

  1. The plugin requires the Google Play services library to be included in the project. Add the entire /extras/google/google_play_services/libproject/google-play-services_lib/ folder into the Assets/Plugins/Android folder of your Unity project.

因此昨天我通过 Android SDK 管理器升级到 Google Play Services V.26。然后按照指南中的说明进行操作并复制

Android\sdk\extras\google\google_play_services

C:\Users\Me\MyGame\Assets\Plugins\Android

然而,当现在尝试在 Unity 中构建 Android 项目时,它会抱怨重复的 js 文件,例如我复制过来的 google_play_services 中的 prettify.js:

Scripts named 'prettify.js" exists in multiple locations (Assets/Plugins/Android/google_play_services/docs/assets/js/prettify.js). Please rename one of the scripts to a unique name.

原因是- Android\sdk\extras\google\google_play_services中的原始文件夹确实有重复的js文件!所以它不是在统一中发生的事情,也不是通过将其复制到统一中来发生的。以下屏幕截图显示了重复的 js 文件:

我不知道是否可以只删除其中一个脚本,但我不知道是哪一个...虽然我倾向于删除 \docs 中的脚本,而不是 [=42 中的脚本=]...

你把 "android-sdk\extras\google\google_play_services" 复制到 Plugins/Android 了吗?这就是问题。你不应该。只需将 "android-sdk\extras\google\google_play_services \libproject\google-play-services_lib" 复制到 plugins/android