stk*_*flw 5 android react-native
我正在尝试将gradle从1.3.1更新到3.5,因为我的某些依赖项需要版本3.3或更高版本。
我见过类似的问题,但没有一个有帮助。
build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5'
}
}
Run Code Online (Sandbox Code Playgroud)
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
Run Code Online (Sandbox Code Playgroud)
尝试做任何事情(构建,清理等)时,我仍然得到此信息:
Building and installing the app on the device (cd android && ./gradlew installDebug...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'chat'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:3.5.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/3.5/gradle-3.5.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.5/gradle-3.5.jar
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Run Code Online (Sandbox Code Playgroud)
Yul*_*mok 20
正确的变体是:
buildscript {
repositories {
jcenter()
google() //HAVE YOU MISS IT?
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
allprojects {
repositories {
jcenter()
google() //HAVE YOU MISS IT?
}
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
16239 次 |
最近记录: |