问题:
React Native CLI 应用程序运行时, buildToolsVersion =“31.0.0”
但是在更改为时, buildToolsVersion =“33.0.1”
它显示错误:- Android Studio 错误“安装的构建工具修订版 33.0.1 已损坏” 有一段时间 ./gradlew clean 和 npx react-native run-android 失败了。
非常感谢任何提供解决方案的人!
我已经尝试过:-
1) rm -rf node_modules package-lock.json
npm i --force
这不起作用。
2) cd android && ./gradlew assembleDebug && ./gradlew installDebug
运行此命令时,中间失败。
解决方案:
对于 Linux/Mac 操作系统:
前往航站楼:
~ cd home
~ cd yourDirectory //eg:ashif
~ cd Android
~ cd cd build-tools
~ cd 33.0.1 //your desired build-tools version
~ cp d8 dx //copy d8 and create directory dx
~ cd lib
~ cp d8.jar dx.jar //copy d8.jar and create directory dx.jar
~ ls //to list and check the changes
就是这样!它有效😊。