Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'Project'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:4.2.2.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:4.2.2.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
> Connect to ubuntu.buct.cn:80 [ubuntu.buct.cn/124.206.29.168] failed: Connection timed out: connect
> Could not resolve com.android.tools.build:gradle:4.2.2.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
> Connect to ubuntu.buct.cn:80 [ubuntu.buct.cn/124.206.29.168] failed: Connection timed out: connect
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 23s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
都不知道什么意思,
感觉应该是gradle构建时卡死了
build.gradle(Project)
allprojects {
repositories {
mavenCentral()
google()
maven {url "https://jitpack.io"}
}
}
Could not resolve com.android.tools.build:gradle:4.2.2.下载失败
因为安卓是谷歌的,这些安卓的下载都需要用镜像来下载。