- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
在我的 Unity 项目中,我导入了插件:Android Native Plugin和 Chartboost。
在导入 Chartboost 统一包之前,我可以在我的 Android 设备上成功构建和运行。但是在导入 Chartboost 包之后,我在尝试构建和运行时遇到了这个错误。
这是构建错误:
Error building Player: CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/user/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/Unity.app/Contents/BuildTargetTools/AndroidPlayer/sdktools.jar" -
stderr[
Error: [Temp/StagingArea/AndroidManifest-main.xml:8, /Users/user/Documents/Unity Projects/Unity 5.0.0 projects/mygame/Temp/StagingArea/android-libraries/ChartboostSDK/AndroidManifest.xml:11] Trying to merge incompatible /manifest/application/meta-data[@name=com.google.android.gms.version] element:
<meta-data
@android:name="com.google.android.gms.version"
-- @android:value="6587000">
<meta-data
@android:name="com.google.android.gms.version"
++ @android:value="@integer/google_play_services_version">
Error: [Temp/StagingArea/AndroidManifest-main.xml:8, /Users/user/Documents/Unity Projects/Unity 5.0.0 projects/mygame/Temp/StagingArea/android-libraries/google-play-services_lib/AndroidManifest.xml:5] Trying to merge incompatible /manifest/application/meta-data[@name=com.google.android.gms.version] element:
<meta-data
@android:name="com.google.android.gms.version"
-- @android:value="6587000">
<meta-data
@android:name="com.google.android.gms.version"
++ @android:value="@integer/google_play_services_version">
]
stdout[
]
我对 Android 开发还是个新手,所以我有点不知所措。我在网上看到一些关于类似问题的帖子,据我了解,每当使用多个插件时,也会有多个 list 文件,并且 Unity 有时会由于不同/冲突的值而无法合并 list 。
不过,我在错误消息中没有看到任何值冲突。我该如何解决?非常感谢任何帮助。
更新:在 Max Yankov 的帮助下,我能够克服 Unable to merge manifests 错误
。但是我现在遇到一个新错误 Unable to convert classes into dex format
这是该错误的日志:
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/user/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/Unity.app/Contents/BuildTargetTools/AndroidPlayer/sdktools.jar" -
stderr[
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/SearchIntents;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:732)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:229)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at SDKMain.main(SDKMain.java:129)
1 error; aborting
]
stdout[
processing archive bin/classes.jar...
processing com/unity3d/player/a$1.class...
processing com/unity3d/player/a$2.class...
processing com/unity3d/player/a$a.class...
processing com/unity3d/player/a.class...
processing com/unity3d/player/b$1.class...
processing com/unity3d/player/b$2.class...
processing com/unity3d/player/b.class...
processing com/unity3d/player/c.class...
processing com/unity3d/player/d$1.class...
processing com/unity3d/player/d$2.class...
processing com/unity3d/player/d.class...
processing com/unity3d/player/e.class...
processing com/unity3d/player/f.class...
processing com/unity3d/player/g.class...
processing com/unity3d/player/h.class...
processing com/unity3d/player/i.class...
processing com/unity3d/player/j$1.class...
processing com/unity3d/player/j$2$1$1.class...
processing com/unity3d/player/j$2$1.class...
processing com/unity3d/player/j$2.class...
processing com/unity3d/player/j.class...
processing com/unity3d/player/k$1.class...
processing com/unity3d/player/k.class...
processing com/unity3d/player/l.class...
processing com/unity3d/player/m.class...
processing com/unity3d/player/n$1.class...
processing com/unity3d/player/n.class...
processing com/unity3d/player/NativeLoader.class...
processing com/unity3d/player/o.class...
processing com/unity3d/player/ReflectionHelper$1.class...
processing com/unity3d/player/ReflectionHelper$a.class...
processing com/unity3d/player/ReflectionHelper.class...
processing com/unity3d/player/p.class...
processing com/unity3d/player/q$1.class...
processing com/unity3d/player/q$2.class...
processing com/unity3d/player/q$3.class...
processing com/unity3d/player/q.class...
processing com/unity3d/player/r.class...
processing com/unity3d/player/s.class...
processing com/unity3d/player/UnityPlayer$1.class...
processing com/unity3d/player/UnityPlayer$2.class...
processing com/unity3d/player/UnityPlayer$3.class...
processing com/unity3d/player/UnityPlayer$4.class...
processing com/unity3d/player/UnityPlayer$5.class...
processing com/unity3d/player/UnityPlayer$6.class...
processing com/unity3d/player/UnityPlayer$7.class...
processing com/unity3d/player/UnityPlayer$8.class...
processing com/unity3d/player/UnityPlayer$9.class...
processing com/unity3d/player/UnityPlayer$10.class...
processing com/unity3d/player/UnityPlayer$11.class...
processing com/unity3d/player/UnityPlayer$12$1.class...
processing com/unity3d/player/UnityPlayer$12.class...
processing com/unity3d/player/UnityPlayer$13.class...
processing com/unity3d/player/UnityPlayer$14.class...
processing com/unity3d/player/UnityPlayer$15.class...
processing com/unity3d/player/UnityPlayer$16.class...
processing com/unity3d/player/UnityPlayer$17.class...
processing com/unity3d/player/UnityPlayer$18.class...
processing com/unity3d/player/UnityPlayer$a.class...
processing com/unity3d/player/UnityPlayer$b.class...
processing com/unity3d/player/UnityPlayer$c.class...
processing com/unity3d/player/UnityPlayer.class...
processing com/unity3d/player/UnityPlayerActivity.class...
processing com/unity3d/player/UnityPlayerNativeActivity.class...
processing com/unity3d/player/UnityPlayerProxyActivity.class...
processing com/unity3d/player/t.class...
processing com/unity3d/player/u$1.class...
processing com/unity3d/player/u.class...
processing com/unity3d/player/WWW.class...
processing org/fmod/FMODAudioDevice$a.class...
processing org/fmod/FMODAudioDevice.class...
processing org/fmod/a.class...
processing bin/classes/./com/chartboost/sdk/unity/Manifest$permission.class...
processing bin/classes/./com/chartboost/sdk/unity/Manifest.class...
processing bin/classes/./com/chartboost/sdk/unity/R$attr.class...
processing bin/classes/./com/chartboost/sdk/unity/R$bool.class...
processing bin/classes/./com/chartboost/sdk/unity/R$color.class...
processing bin/classes/./com/chartboost/sdk/unity/R$dimen.class...
processing bin/classes/./com/chartboost/sdk/unity/R$drawable.class...
processing bin/classes/./com/chartboost/sdk/unity/R$id.class...
processing bin/classes/./com/chartboost/sdk/unity/R$integer.class...
processing bin/classes/./com/chartboost/sdk/unity/R$layout.class...
processing bin/classes/./com/chartboost/sdk/unity/R$raw.class...
processing bin/classes/./com/chartboost/sdk/unity/R$string.class...
processing bin/classes/./com/chartboost/sdk/unity/R$style.class...
processing bin/classes/./com/chartboost/sdk/unity/R$styleable.class...
processing bin/classes/./com/chartboost/sdk/unity/R$xml.class...
processing bin/classes/./com/chartboost/sdk/unity/R.class...
processing bin/classes/./com/facebook/android/Manifest$permission.class...
processing bin/classes/./com/facebook/android/Manifest.class...
processing bin/classes/./com/facebook/android/R$attr.class...
processing bin/classes/./com/facebook/android/R$bool.class...
processing bin/classes/./com/facebook/android/R$color.class...
processing bin/classes/./com/facebook/android/R$dimen.class...
processing bin/classes/./com/facebook/android/R$drawable.class...
processing bin/classes/./com/facebook/android/R$id.class...
processing bin/classes/./com/facebook/android/R$integer.class...
processing bin/classes/./com/facebook/android/R$layout.class...
processing bin/classes/./com/facebook/android/R$raw.class...
processing bin/classes/./com/facebook/android/R$string.class...
processing bin/classes/./com/facebook/android/R$style.class...
processing bin/classes/./com/facebook/android/R$styleable.class...
processing bin/classes/./com/facebook/android/R$xml.class...
processing bin/classes/./com/facebook/android/R.class...
processing bin/classes/./com/google/android/gms/Manifest$permission.class...
processing bin/classes/./com/google/android/gms/Manifest.class...
processing bin/classes/./com/google/android/gms/R$attr.class...
processing bin/classes/./com/google/android/gms/R$bool.class...
processing bin/classes/./com/google/android/gms/R$color.class...
processing bin/classes/./com/google/android/gms/R$dimen.class...
processing bin/classes/./com/google/android/gms/R$drawable.class...
processing bin/classes/./com/google/android/gms/R$id.class...
processing bin/classes/./com/google/android/gms/R$integer.class...
processing bin/classes/./com/google/android/gms/R$layout.class...
processing bin/classes/./com/google/android/gms/R$raw.class...
processing bin/classes/./com/google/android/gms/R$string.class...
processing bin/classes/./com/google/android/gms/R$style.class...
processing bin/classes/./com/google/android/gms/R$styleable.class...
processing bin/classes/./com/google/android/gms/R$xml.class...
processing bin/classes/./com/google/android/gms/R.class...
processing bin/classes/./com/test/asdf/Manifest$permission.class...
processing bin/classes/./com/test/asdf/Manifest.class...
processing bin/classes/./com/test/asdf/R$attr.class...
processing bin/classes/./com/test/asdf/R$bool.class...
processing bin/classes/./com/test/asdf/R$color.class...
processing bin/classes/./com/test/asdf/R$dimen.class...
processing bin/classes/./com/test/asdf/R$drawable.class...
processing bin/classes/./com/test/asdf/R$id.class...
processing bin/classes/./com/test/asdf/R$integer.class...
processing bin/classes/./com/test/asdf/R$layout.class...
processing bin/classes/./com/test/asdf/R$raw.class...
processing bin/classes/./com/test/asdf/R$string.class...
processing bin/classes/./com/test/asdf/R$style.class...
processing bin/classes/./com/test/asdf/R$styleable.class...
processing bin/classes/./com/test/asdf/R$xml.class...
processing bin/classes/./com/test/asdf/R.class...
processing archive plugins/./an_billing.jar...
ignored resource META-INF/MANIFEST.MF
processing com/android/vending/billing/IInAppBillingService$Stub$Proxy.class...
processing com/android/vending/billing/IInAppBillingService$Stub.class...
processing com/android/vending/billing/IInAppBillingService.class...
processing com/androidnative/billing/core/AN_BillingProxyActivity$1.class...
processing com/androidnative/billing/core/AN_BillingProxyActivity.class...
processing com/androidnative/billing/core/BillingHelper$1.class...
processing com/androidnative/billing/core/BillingHelper$2$1.class...
processing com/androidnative/billing/core/BillingHelper$2.class...
processing com/androidnative/billing/core/BillingHelper$3$1.class...
processing com/androidnative/billing/core/BillingHelper$3$2.class...
processing com/androidnative/billing/core/BillingHelper$3.class...
processing com/androidnative/billing/core/BillingHelper.class...
processing com/androidnative/billing/core/BillingManager$1.class...
processing com/androidnative/billing/core/BillingManager$2.class...
processing com/androidnative/billing/core/BillingManager$3.class...
processing com/androidnative/billing/core/BillingManager.class...
processing com/androidnative/billing/core/listeners/AN_PurchaseFinishedListener.class...
processing com/androidnative/billing/core/listeners/AN_QueryInventoryFinishedListener.class...
processing com/androidnative/billing/interfaces/OnBillingPurchaseFinishedListener.class...
processing com/androidnative/billing/interfaces/OnBillingSetupFinishedListener.class...
processing com/androidnative/billing/interfaces/OnConsumeFinishedListener.class...
processing com/androidnative/billing/interfaces/OnConsumeMultiFinishedListener.class...
processing com/androidnative/billing/interfaces/QueryInventoryFinishedListener.class...
processing com/androidnative/billing/models/BillingException.class...
processing com/androidnative/billing/models/BillingResult.class...
processing com/androidnative/billing/models/Inventory.class...
processing com/androidnative/billing/models/Purchase.class...
processing com/androidnative/billing/models/Security.class...
processing com/androidnative/billing/models/SkuDetails.class...
processing com/androidnative/billing/util/Base64.class...
processing com/androidnative/billing/util/Base64DecoderException.class...
processing archive plugins/./an_googleplay.jar...
ignored resource META-INF/MANIFEST.MF
processing com/androidnative/an_googleplay/BuildConfig.class...
processing com/androidnative/an_googleplay/R$attr.class...
processing com/androidnative/an_googleplay/R$drawable.class...
processing com/androidnative/an_googleplay/R$id.class...
processing com/androidnative/an_googleplay/R$layout.class...
processing com/androidnative/an_googleplay/R$string.class...
processing com/androidnative/an_googleplay/R$style.class...
processing com/androidnative/an_googleplay/R.class...
processing com/androidnative/gcm/ANCloudMessageService$1.class...
processing com/androidnative/gcm/ANCloudMessageService$2.class...
processing com/androidnative/gcm/ANCloudMessageService.class...
processing com/androidnative/gcm/GcmBroadcastReceiver.class...
processing com/androidnative/gcm/GcmIntentService.class...
processing com/androidnative/gms/ad/ANMobileAd.class...
processing com/androidnative/gms/ad/AdInAppListner.class...
processing com/androidnative/gms/ad/BannerAdListner.class...
processing com/androidnative/gms/ad/GADBanner.class...
processing com/androidnative/gms/ad/InterstitialAdListner.class...
processing com/androidnative/gms/analytics/AN_AnalyticsProxy.class...
processing com/androidnative/gms/analytics/V4GoogleAnalytics.class...
processing com/androidnative/gms/core/GameClientBridge.class...
processing com/androidnative/gms/core/GameClientManager$1.class...
processing com/androidnative/gms/core/GameClientManager$2.class...
processing com/androidnative/gms/core/GameClientManager$3.class...
processing com/androidnative/gms/core/GameClientManager$4.class...
processing com/androidnative/gms/core/GameClientManager$5.class...
processing com/androidnative/gms/core/GameClientManager.class...
processing com/androidnative/gms/core/GameInvitationManager.class...
processing com/androidnative/gms/core/GooglePlaySupportActivity$1.class...
processing com/androidnative/gms/core/GooglePlaySupportActivity.class...
processing com/androidnative/gms/core/NewGameHelper.class...
processing com/androidnative/gms/listeners/appstate/StateDeleteListener.class...
processing com/androidnative/gms/listeners/appstate/StateUpdateListener.class...
processing com/androidnative/gms/listeners/appstate/StatesLoadedListener.class...
processing com/androidnative/gms/listeners/games/AchievementsLoadListner.class...
processing com/androidnative/gms/listeners/games/AchievementsUpdateListner.class...
processing com/androidnative/gms/listeners/games/LeaderBoardScoreLoaded.class...
processing com/androidnative/gms/listeners/games/LeaderBoardsLoadedListener.class...
processing com/androidnative/gms/listeners/games/PlayerResultListner.class...
processing com/androidnative/gms/listeners/games/PlayerScoreUpdateListner.class...
processing com/androidnative/gms/listeners/games/ScoreSubmitedListner.class...
processing com/androidnative/gms/listeners/network/AN_OnInvitationReceivedListener.class...
processing com/androidnative/gms/listeners/network/AN_RealTimeMessageReceivedListener.class...
processing com/androidnative/gms/listeners/network/AN_RoomStatusUpdateListener.class...
processing com/androidnative/gms/listeners/network/AN_RoomUpdateListener.class...
processing com/androidnative/gms/listeners/quests/AN_AcceptQuestResultListner.class...
processing com/androidnative/gms/listeners/quests/AN_ClaimMilestoneResult.class...
processing com/androidnative/gms/listeners/quests/AN_EventsLoadListner.class...
processing com/androidnative/gms/listeners/quests/AN_LoadQuestsResult.class...
processing com/androidnative/gms/listeners/quests/AN_QuestUpdateListener.class...
processing com/androidnative/gms/listeners/requests/AN_LoadRequestsResultListner.class...
processing com/androidnative/gms/listeners/requests/AN_UpdateRequestsResultListner.class...
processing com/androidnative/gms/listeners/savedgames/DeleteSnapShotListner.class...
processing com/androidnative/gms/listeners/savedgames/DeleteSpapShotResultListner.class...
processing com/androidnative/gms/listeners/savedgames/LoadSnapshotsResultListner.class...
processing com/androidnative/gms/listeners/savedgames/OpenSnapshotListner.class...
processing com/androidnative/gms/listeners/savedgames/SnapshotCreateListner.class...
processing com/androidnative/gms/listeners/savedgames/SnapshotMetadataChangeListner.class...
processing com/androidnative/<message truncated>
最佳答案
看起来其中一个插件正在将 com.google.android.gms.version
的值保存在 AndroidManifest.xml 本身中,而另一个使用 string resource ;我想在源代码的某处有一个文件 integer.xml
,当您找到它时,里面会隐藏一个 google_play_services_version
的值。 com.google.android.gms.version
本身似乎是 Google Play 服务的必需版本;它向后兼容是合理的,所以我只会从这两个中选择最大的数字。检查this有关详细信息(切换到“其他”以查看配置详细信息)。
关于android - Unity 无法合并 Android list 构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30000704/
我最近在/ drawable中添加了一些.gifs,以便可以将它们与按钮一起使用。这个工作正常(没有错误)。现在,当我重建/运行我的应用程序时,出现以下错误: Error: Gradle: Execu
Android 中有返回内部存储数据路径的方法吗? 我有 2 部 Android 智能手机(Samsung s2 和 s7 edge),我在其中安装了一个应用程序。我想使用位于这条路径中的 sqlit
这个问题在这里已经有了答案: What's the difference between "?android:" and "@android:" in an android layout xml f
我只想知道 android 开发手机、android 普通手机和 android root 手机之间的实际区别。 我们不能从实体店或除 android marketplace 以外的其他地方购买开发手
自Gradle更新以来,我正在努力使这个项目达到标准。这是一个团队项目,它使用的是android-apt插件。我已经进行了必要的语法更改(编译->实现和apt->注释处理器),但是编译器仍在告诉我存在
我是android和kotlin的新手,所以请原谅要解决的一个非常简单的问题! 我已经使用导航体系结构组件创建了一个基本应用程序,使用了底部的导航栏和三个导航选项。每个导航选项都指向一个专用片段,该片
我目前正在使用 Facebook official SDK for Android . 我现在正在使用高级示例应用程序,但我不知道如何让它获取应用程序墙/流/状态而不是登录的用户。 这可能吗?在那种情
我在下载文件时遇到问题, 我可以在模拟器中下载文件,但无法在手机上使用。我已经定义了上网和写入 SD 卡的权限。 我在服务器上有一个 doc 文件,如果用户单击下载。它下载文件。这在模拟器中工作正常但
这个问题在这里已经有了答案: What is the difference between gravity and layout_gravity in Android? (22 个答案) 关闭 9
任何人都可以告诉我什么是 android 缓存和应用程序缓存,因为当我们谈论缓存清理应用程序时,它的作用是,缓存清理概念是清理应用程序缓存还是像内存管理一样主存储、RAM、缓存是不同的并且据我所知,缓
假设应用程序 Foo 和 Eggs 在同一台 Android 设备上。任一应用程序都可以获取设备上所有应用程序的列表。一个应用程序是否有可能知道另一个应用程序是否已经运行以及运行了多长时间? 最佳答案
我有点困惑,我只看到了从 android 到 pc 或者从 android 到 pc 的例子。我需要制作一个从两部手机 (android) 连接的 android 应用程序进行视频聊天。我在想,我知道
用于使用 Android 以编程方式锁定屏幕。我从 Stackoverflow 之前关于此的问题中得到了一些好主意,并且我做得很好,但是当我运行该代码时,没有异常和错误。而且,屏幕没有锁定。请在这段代
文档说: android:layout_alignParentStart If true, makes the start edge of this view match the start edge
我不知道这两个属性和高度之间的区别。 以一个TextView为例,如果我将它的layout_width设置为wrap_content,并将它的width设置为50 dip,会发生什么情况? 最佳答案
这两个属性有什么关系?如果我有 android:noHistory="true",那么有 android:finishOnTaskLaunch="true" 有什么意义吗? 最佳答案 假设您的应用中有
我是新手,正在尝试理解以下 XML 代码: 查看 developer.android.com 上的文档,它说“starStyle”是 R.attr 中的常量, public static final
在下面的代码中,为什么当我设置时单选按钮的外观会发生变化 android:layout_width="fill_parent" 和 android:width="fill_parent" 我说的是
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 9
假设我有一个函数 fun myFunction(name:String, email:String){},当我调用这个函数时 myFunction('Ali', 'ali@test.com ') 如何
我是一名优秀的程序员,十分优秀!