Project Settings ——>Player——>Publishing Settings
勾选 Custom Main Gradle Template 和Custom Gradle Properties Template
此时Plugins>Android 文件夹下会生成对应的两个文件
此时我们选择强制解析
就可以直接跳过进度条解析成功
此时可以直接打包
如果打包卡在Building Gradle Project则我们需要修改mainTemplate.gradle里边的两个地址,用记事本或者Vs打开都可
修改为
地址:https://maven.aliyun.com/repository/google
地址:https://maven.aliyun.com/repository/public/
后续不要再选择强制解析,否则地址会被还原