一个老的项目,前两个月还可以打包成功。突然打包失败了。
记录一下解决过程:
1、jcenter()已失效,改为mavenCentral()
添加阿里云镜像:
<code> google() mavenCentral() maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' } </code>
2、Installed Build Tools revision 31.0.0 is corrupted
- go to the location
"C:\Users\user\AppData\Local\Android\Sdk\build-tools\31.0.0"
- find a file named d8.bat. This is a Windows batch file.
- rename d8.bat to dx.bat.
- in the folder lib (“C:\Users\user\AppData\Local\Android\Sdk\build-tools\31.0.0\lib”)
- rename d8.jar to dx.jar
0 条评论。