我已经在 Windows 上设置了 react native 的环境。但是当我运行命令时
react-native run-android
我收到以下错误 -
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
我该如何解决?
原文由 Paul Santosh 发布,翻译遵循 CC BY-SA 4.0 许可协议
您可以通过将
google()
存储库添加到build.gradle
文件并将 gradle build tools 版本 升级到 6 或更高版本来解决此问题。