无法解析 React Native 中配置“:classpath”的所有文件

Could not resolve all files for configuration ':classpath' in react native

失败:构建失败,出现异常。

构建在 23 秒内失败 无法在设备上安装应用程序,请阅读上面的错误以了解详细信息。 确保您已连接 Android 模拟器 运行 或设备,并且 设置您的 Android 开发环境: https://facebook.github.io/react-native/docs/getting-started.html

解决443错误必须使用VPN

我的解决方案是清除 gradle 缓存并重建。

对我来说 mac,这意味着清除 ~/.gradle/caches 文件夹。

在 windows 上应该通过 C:\Users\<user>\.gradle\caches