2017-06-22 26 views
6

Właśnie rozpoczęto nowy projekt Androida z programem Studio 3.0 Canary 3 przy użyciu kotlina i po prostu staram się uzyskać synchronizację projektu gradle. Obecnie nie działa zGradle kotlin Nieobsługiwana metoda Dependencies.getAtoms()

Error:Unsupported method: Dependencies.getAtoms(). 
The version of Gradle you connect to does not support that method. 
To resolve the problem you can change/upgrade the target version of Gradle you connect to. 
Alternatively, you can ignore this exception and read other information from the model. 

Ktoś wie, co to znaczy i jak się z nim obejść?

Prawdopodobnie wystarczy zmienić wersję czegoś.

Gradle wrapper:

#Mon Jun 19 08:02:32 BST 2017 
distributionBase=GRADLE_USER_HOME 
distributionPath=wrapper/dists 
zipStoreBase=GRADLE_USER_HOME 
zipStorePath=wrapper/dists 
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip 

projektu Gradle

buildscript { 
    ext.kotlin_version = '1.1.2-5' 
    repositories { 
     maven { url 'https://maven.google.com' } 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.0-alpha4' 
     classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     maven { url 'https://maven.google.com' } 
     jcenter() 
     mavenCentral() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

aplikacja Gradle

apply plugin: 'com.android.application' 

apply plugin: 'kotlin-android' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.3" 
    defaultConfig { 
     applicationId "uk.me.mungorae.aircraft.aircraft" 
     minSdkVersion 21 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    implementation fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 
    implementation 'com.android.support:appcompat-v7:25.4.0' 
    testImplementation 'junit:junit:4.12' 
    implementation 'com.android.support.constraint:constraint-layout:1.0.2' 
} 

Odpowiedz

Powiązane problemy