新建android項目后,第一次運行,提示錯誤:(不一定是31的也可能是其他版本,個人已解決問題)
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
mac 系統
/Users/{自己電腦名稱}/Library/Android/sdk/build-tools/31.0.0,在此文件夾下有個d8文件,lib文件夾,lib文件夾下有d8.jar
打開終端:
cd /Users/xxx/Library/Android/sdk/build-tools/31.0.0
cp d8 dx
cd lib
cp d8.jar dx.jar
重新運行項目安裝即可