build.gradle文件内容:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.novoda:bintray-release:0.8.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
compileSdkVersion = 26
buildToolsVersion = "26.0.2"
minSdkVersion = 16
targetSdkVersion = 26
lib_appcompat_v7 = 'com.android.support:appcompat-v7:26.1.0'
lib_support_v4 = 'com.android.support:support-v4:26.1.0'
lib_support_design = 'com.androdi.support:design:26.1.0'
}
同步失败。错误如下:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.novoda:bintray-release:0.8.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
compileSdkVersion = 26
buildToolsVersion = "26.0.2"
minSdkVersion = 16
targetSdkVersion = 26
lib_appcompat_v7 = 'com.android.support:appcompat-v7:26.1.0'
lib_support_v4 = 'com.android.support:support-v4:26.1.0'
lib_support_design = 'com.androdi.support:design:26.1.0'
}
我正在尝试将gradle从1.3.1更新到3.5,因为我的一些依赖项需要3.3或更高版本。 我见过类似的问题,但都没有帮助。 build.gradle: gradle-wrapper.properties: 但是,当我尝试做任何事情(构建、清理等)时,我还是得到了这样的结果:
找不到com.android.tools.build:Gradle:4.0.0. https://jcenter.bintray.com/com/android/tools/build/gradle/4.0.0/gradle-4.0.0.pom
null Build.Gradle(项目): 我刚刚从android Studio2.3.3迁移到4.0.1。 我的问题是什么????如果你需要更多信息就告诉我。 感谢您的回答:)
我正在构建一个react原生应用程序,并使用库。 在我的Android/build.gradle中,我在buildScript中有以下内容: 这是否意味着我必须降级我的gradle版本?