Unity 发布APK报错

这篇博客主要讲述了在Unity中发布APK时遇到的两个问题及其解决办法。问题1是Build Gradle错误,解决方法是在Build Settings的Publishing Settings中勾选Custom Gradle Template。问题2涉及EditorSettings.asset文件,通过复制并替换特定内容到该文件中,位于ProjectSettings文件夹内,参考了Unity论坛的相关帖子。
摘要由CSDN通过智能技术生成

问题1:

Build Gradle错误

CommandInvokationFailure: Gradle build failed. 
D:/JAVASDK/jdk1.8.0_251\bin\java.exe -classpath "F:\Unity2018\install\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'gradleOut'.
> Could not resolve all files for configuration ':classpath'.
   > Could not download layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:26.0.1)
      > Could not get resource 'http://maven.aliyun.com/nexus/content/groups/public/com/android/tools/layoutlib/layoutlib-api/26.0.1/layoutlib-api-26.0.1.jar'.
         > Could not GET 'http://maven.aliyun.com/nexus/content/groups/public/com/android/tools/layoutlib/layoutlib-api/26.0.1/layoutlib-api-26.0.1.jar'.
            > Connect to archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com:443 [archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com/49.7.22.5] failed: Connection timed out: connect

* 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 1m 7s
]
stdout[
Download http://maven.aliyun.com/nexus/content/groups/public/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
Download http://maven.aliyun.com/nexus/content/groups/public/com/android/tools/build/gradle-core/3.0.1/gradle-core-3.0.1.pom
Download http://
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值