unity打Android包报错

十二点不睡觉 十二点不睡觉 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Java\jdk1.8.0_40\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2018.2.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleDebug"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s
]
stdout[
Starting a Gradle Daemon, 2 stopped Daemons could not be reused, use --status for details
:preBuild UP-TO-DATE
:Firebase:preBuild UP-TO-DATE
:Firebase:preDebugBuild UP-TO-DATE
:Firebase:checkDebugManifest
:Firebase:processDebugManifest
:GoogleMobileAdsPlugin:preBuild UP-TO-DATE
:GoogleMobileAdsPlugin:preDebugBuild UP-TO-DATE
:GoogleMobileAdsPlugin:checkDebugManifest
:GoogleMobileAdsPlugin:processDebugManifest
:GooglePlayGamesManifest.plugin:preBuild UP-TO-DATE
:GooglePlayGamesManifest.plugin:preDebugBuild UP-TO-DATE
:GooglePlayGamesManifest.plugin:checkDebugManifest
:GooglePlayGamesManifest.plugin:processDebugManifest
:preDebugBuild
:Firebase:compileDebugAidl
:GoogleMobileAdsPlugin:compileDebugAidl
:GooglePlayGamesManifest.plugin:compileDebugAidl
:compileDebugAidl
:Firebase:packageDebugRenderscript NO-SOURCE
:GoogleMobileAdsPlugin:packageDebugRenderscript NO-SOURCE
:GooglePlayGamesManifest.plugin:packageDebugRenderscript NO-SOURCE
:compileDebugRenderscript
:checkDebugManifest
:generateDebugBuildConfig
:prepareLintJar
:generateDebugResValues
:generateDebugResources
:Firebase:compileDebugRenderscript
:Firebase:generateDebugResValues
:Firebase:generateDebugResources
:Firebase:packageDebugResources
:GoogleMobileAdsPlugin:compileDebugRenderscript
:GoogleMobileAdsPlugin:generateDebugResValues
:GoogleMobileAdsPlugin:generateDebugResources
:GoogleMobileAdsPlugin:packageDebugResources
:GooglePlayGamesManifest.plugin:compileDebugRenderscript
:GooglePlayGamesManifest.plugin:generateDebugResValues
:GooglePlayGamesManifest.plugin:generateDebugResources
:GooglePlayGamesManifest.plugin:packageDebugResources
:mergeDebugResources
:createDebugCompatibleScreenManifests
:processDebugManifest
:splitsDiscoveryTaskDebug
:Firebase:platformAttrExtractor
:GoogleMobileAdsPlugin:platformAttrExtractor
:GooglePlayGamesManifest.plugin:platformAttrExtractor
:Firebase:generateDebugBuildConfig
:Firebase:prepareLintJar
:Firebase:javaPreCompileDebug
:Firebase:processDebugJavaRes NO-SOURCE
:GoogleMobileAdsPlugin:generateDebugBuildConfig
:GoogleMobileAdsPlugin:prepareLintJar
:GoogleMobileAdsPlugin:javaPreCompileDebug
:GoogleMobileAdsPlugin:processDebugJavaRes NO-SOURCE
:GooglePlayGamesManifest.plugin:generateDebugBuildConfig
:GooglePlayGamesManifest.plugin:prepareLintJar
:GooglePlayGamesManifest.plugin:javaPreCompileDebug
:GooglePlayGamesManifest.plugin:processDebugJavaRes NO-SOURCE
:compileDebugNdk NO-SOURCE
:mergeDebugShaders
:compileDebugShaders
:generateDebugAssets
:Firebase:mergeDebugShaders
:Firebase:compileDebugShaders
:Firebase:generateDebugAssets
:Firebase:mergeDebugAssets
:GoogleMobileAdsPlugin:mergeDebugShaders
:GoogleMobileAdsPlugin:compileDebugShaders
:GoogleMobileAdsPlugin:generateDebugAssets
:GoogleMobileAdsPlugin:mergeDebugAssets
:GooglePlayGamesManifest.plugin:mergeDebugShaders
:GooglePlayGamesManifest.plugin:compileDebugShaders
:GooglePlayGamesManifest.plugin:generateDebugAssets
:GooglePlayGamesManifest.plugin:mergeDebugAssets
:mergeDebugAssets
:mergeDebugJniLibFolders
:Firebase:compileDebugNdk NO-SOURCE
:Firebase:mergeDebugJniLibFolders
:Firebase:transformNativeLibsWithMergeJniLibsForDebug
:Firebase:transformNativeLibsWithStripDebugSymbolForDebug
:Firebase:transformNativeLibsWithIntermediateJniLibsForDebug
:GoogleMobileAdsPlugin:compileDebugNdk NO-SOURCE
:GoogleMobileAdsPlugin:mergeDebugJniLibFolders
:GoogleMobileAdsPlugin:transformNativeLibsWithMergeJniLibsForDebug
:GoogleMobileAdsPlugin:transformNativeLibsWithStripDebugSymbolForDebug
:GoogleMobileAdsPlugin:transformNativeLibsWithIntermediateJniLibsForDebug
:GooglePlayGamesManifest.plugin:compileDebugNdk NO-SOURCE
:GooglePlayGamesManifest.plugin:mergeDebugJniLibFolders
:GooglePlayGamesManifest.plugin:transformNativeLibsWithMergeJniLibsForDebug
:GooglePlayGamesManifest.plugin:transformNativeLibsWithStripDebugSymbolForDebug
:GooglePlayGamesManifest.plugin:transformNativeLibsWithIntermediateJniLibsForDebug
:processDebugJavaRes NO-SOURCE
:validateSigningDebug
:Firebase:mergeDebugConsumerProguardFiles
:Firebase:transformNativeLibsWithSyncJniLibsForDebug
:GoogleMobileAdsPlugin:mergeDebugConsumerProguardFiles
:GoogleMobileAdsPlugin:transformNativeLibsWithSyncJniLibsForDebug
:GooglePlayGamesManifest.plugin:mergeDebugConsumerProguardFiles
:GooglePlayGamesManifest.plugin:transformNativeLibsWithSyncJniLibsForDebug
:GooglePlayGamesManifest.plugin:processDebugResources
:GooglePlayGamesManifest.plugin:generateDebugSources
:GooglePlayGamesManifest.plugin:compileDebugJavaWithJavac
:GooglePlayGamesManifest.plugin:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:GooglePlayGamesManifest.plugin:extractDebugAnnotations
:GooglePlayGamesManifest.plugin:transformResourcesWithMergeJavaResForDebug
:GooglePlayGamesManifest.plugin:transformClassesAndResourcesWithSyncLibJarsForDebug
:GooglePlayGamesManifest.plugin:bundleDebug
:GooglePlayGamesManifest.plugin:compileDebugSources
:GooglePlayGamesManifest.plugin:assembleDebug
:GoogleMobileAdsPlugin:processDebugResources
:GoogleMobileAdsPlugin:generateDebugSources
:GoogleMobileAdsPlugin:compileDebugJavaWithJavac
:GoogleMobileAdsPlugin:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:GoogleMobileAdsPlugin:extractDebugAnnotations
:GoogleMobileAdsPlugin:transformResourcesWithMergeJavaResForDebug
:GoogleMobileAdsPlugin:transformClassesAndResourcesWithSyncLibJarsForDebug
:GoogleMobileAdsPlugin:bundleDebug
:GoogleMobileAdsPlugin:compileDebugSources
:GoogleMobileAdsPlugin:assembleDebug
:Firebase:processDebugResources
:processDebugResources
:generateDebugSources
:Firebase:generateDebugSources
:Firebase:compileDebugJavaWithJavac
:Firebase:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:javaPreCompileDebug
:compileDebugJavaWithJavac
:compileDebugSources
:transformClassesWithDexBuilderForDebug
:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
95 actionable tasks: 95 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
...全文

相关推荐

unity打包安卓7.0系统以上 覆盖安装问题

unity打包成android,安装包在系统7.0以上覆盖安装时报错,此unity包直接导入到工程,注意:apk需要提前准备,并且放到网络链接中,找个路径下载到沙盒,否则测试有可能会出错,也可直接参照代码

littleStar2016

unity-adb 工具使用

unity熟悉adb工具使用的必备知识,这里面归纳得很全面

Teaming_Wang

unity中调用安卓的必要jar包

该资源中的jar包解决了Android中7.0和8.0中自动更新时无法自动安装权限的问题,在unity中可以通过此方法调用: AndroidJavaObject _ajo; _ajo = new AndroidJavaClass("com.autoinstall.UpdateVersionActivity").CallStatic("GetInstance"); _ajo.Call("install", dir, filename);//我们在untiy中这样调用就可以了,第一个参数dir,是你保存apk文件的文件夹路径,filename是你apk文件的名字 具体配置参加博客中的具体描述https://blog.csdn.net/u014239709/article/details/81065122

谁是人生一场梦

Unity使用安卓串口附教程

unity 安卓串口接发代码:unity环境在android手机调用手机串口,该解压包内附详细图文教程,按教程来操作即可。

算法决定一切

unity打包安卓实现开机自启

unity打包安卓实现安卓应用开机自启。使用方法:把"安卓开机自动.arr"文件导入到unity项目中,或者根据习惯放在Plugins/Android目录下面。打包成功后安装到手机运行后重启手机,手机重启后等待1-2分钟该应用即可自己打开。需要注意得是有的手机安全软件与设置需要设置自启动权限才能看到效果。

chunyu90225
评论 2
收藏 已收藏
分享
返回顶部
十二点不睡觉
Unity3D 2,592 成员 2,147 内容