在android studio 3.6中渐变同步失败



渐变同步失败:不知道如何为org.gradle.tooling.internal.gradle.DefaultGradleBuild@61cdce4

**// Top-level build file where you can add configuration options common to all sub-projects/modules.**
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://oss.sonatype.org/content/groups/public/" }
}
}

build.gradle(模块:应用程序(

apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.graphhopper.android"
minSdkVersion 10
targetSdkVersion 22
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
disable 'InvalidPackage'
}
}

dependencies {
compile(group: 'com.graphhopper', name: 'graphhopper-core', version: '0.9-SNAPSHOT') {
exclude group: 'com.google.protobuf', module: 'protobuf-java'
exclude group: 'org.openstreetmap.osmosis', module: 'osmosis-osm-binary'
exclude group: 'org.apache.xmlgraphics', module: 'xmlgraphics-commons'
}
compile 'org.mapsforge:vtm:0.6.0'
compile 'org.mapsforge:vtm-android:0.6.0'
compile 'org.mapsforge:vtm-android:0.6.0:natives-armeabi'
compile 'org.mapsforge:vtm-android:0.6.0:natives-armeabi-v7a'
compile 'org.mapsforge:vtm-android:0.6.0:natives-x86'
compile 'org.mapsforge:vtm-jts:0.6.0'
compile 'org.mapsforge:vtm-themes:0.6.0'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
compile 'com.vividsolutions:jts:1.13'
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'org.slf4j:slf4j-android:1.7.21'
}

我使用的是安卓工作室3.6。我无法构建该项目。我试图使缓存无效/重新启动,但没有成功。

请将类路径更新为最新版本并检查

dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}

buildscript {
repositories {
google()       //add here
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
}
}
allprojects {
repositories {
google()      //and here also
jcenter()
maven { url "https://jitpack.io" }
}
}

Build.gradle(应用程序:(

apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.graphhopper.android"
minSdkVersion 16
targetSdkVersion 29
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
disable 'InvalidPackage'
}
}

dependencies {
compile(group: 'com.graphhopper', name: 'graphhopper-core', version: '0.9-SNAPSHOT') {
exclude group: 'com.google.protobuf', module: 'protobuf-java'
exclude group: 'org.openstreetmap.osmosis', module: 'osmosis-osm-binary'
exclude group: 'org.apache.xmlgraphics', module: 'xmlgraphics-commons'
}
compile 'org.mapsforge:vtm:0.6.0'
compile 'org.mapsforge:vtm-android:0.6.0'
compile 'org.mapsforge:vtm-android:0.6.0:natives-armeabi'
compile 'org.mapsforge:vtm-android:0.6.0:natives-armeabi-v7a'
compile 'org.mapsforge:vtm-android:0.6.0:natives-x86'
compile 'org.mapsforge:vtm-jts:0.6.0'
compile 'org.mapsforge:vtm-themes:0.6.0'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
compile 'com.vividsolutions:jts:1.13'
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'org.slf4j:slf4j-android:1.7.21'
}

您的build.gradle(模块:应用程序(应该像这个

apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.graphhopper.android"
minSdkVersion 10
targetSdkVersion 22
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
disable 'InvalidPackage'
}
}

dependencies {
compile(group: 'com.graphhopper', name: 'graphhopper-core', version: '0.9-SNAPSHOT') {
exclude group: 'com.google.protobuf', module: 'protobuf-java'
exclude group: 'org.openstreetmap.osmosis', module: 'osmosis-osm-binary'
exclude group: 'org.apache.xmlgraphics', module: 'xmlgraphics-commons'
}
compile 'org.mapsforge:vtm:0.6.0'
compile 'org.mapsforge:vtm-android:0.6.0'
compile 'org.mapsforge:vtm-android:0.6.0:natives-armeabi'
compile 'org.mapsforge:vtm-android:0.6.0:natives-armeabi-v7a'
compile 'org.mapsforge:vtm-android:0.6.0:natives-x86'
compile 'org.mapsforge:vtm-jts:0.6.0'
compile 'org.mapsforge:vtm-themes:0.6.0'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
compile 'com.vividsolutions:jts:1.13'
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'org.slf4j:slf4j-android:1.7.21'
}

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.6.2'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://oss.sonatype.org/content/groups/public/" }
}
}

您的渐变包装器.properties应该是这样的

#Mon Feb 10 21:12:29 YEKT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-all.zip

最新更新