我有一个问题。
我有最近要负责的React Native代码库。
每当我尝试从内部构建应用程序时,都会出现以下错误 Android Studio。
版本: Android Studio-3.0版。 React-native版本-0.56.0
这是我的gradle-wrapper.properties。
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
这是应用程序的build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
ext {
buildToolsVersion = "26.0.3"
minSdkVersion = 16
compileSdkVersion = 26
targetSdkVersion = 26
supportLibVersion = "26.1.0"
}
这是错误:
Error:Unable to find method 'org.gradle.tooling.model.gradle.GradleBuild.getIncludedBuilds()Lorg/gradle/tooling/model/DomainObjectSet;'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
* Re-download dependencies and sync project (requires network)
* The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
* Stop Gradle build processes (requires restart)
* Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
有人知道我可以从哪里开始调试吗?