无法解析 React Native 中配置“:classpath”的所有文件
Could not resolve all files for configuration ':classpath' in react native
失败:构建失败,出现异常。
出了什么问题:
配置根项目时出现问题 'test1'。
Could not resolve all files for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:4.4.
Required by:
project :
Could not resolve com.android.tools.build:gradle:4.4.
Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.4/gradle-4.4.pom'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.4/gradle-4.4.pom'.
Connect to jcenter.bintray.com:443 [jcenter.bintray.com/75.126.118.188] failed: Connection timed out: connect
尝试:
运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。 运行 使用 --scan 以获得完整的见解。
获取更多帮助
构建在 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
失败:构建失败,出现异常。
出了什么问题: 配置根项目时出现问题 'test1'。
Could not resolve all files for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:4.4. Required by: project : Could not resolve com.android.tools.build:gradle:4.4. Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.4/gradle-4.4.pom'. Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.4/gradle-4.4.pom'. Connect to jcenter.bintray.com:443 [jcenter.bintray.com/75.126.118.188] failed: Connection timed out: connect
尝试: 运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。 运行 使用 --scan 以获得完整的见解。
- 获取更多帮助
构建在 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