【发布时间】:2019-07-03 11:52:53
【问题描述】:
请问我该如何解决这个错误?
错误:Android Gradle 插件仅支持 Kotlin Gradle 插件 版本 1.3.0 及更高版本。以下依赖不满足 所需版本:根项目'android'-> org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.6 受影响的模块: 安卓应用
警告:配置“编译”已过时并已被替换 带有“实现”和“api”。它将在结束时删除 2018. 欲了解更多信息,请参阅:http://d.android.com/r/tools/update-dependency-configurations.html 受影响的模块:android-app
警告:配置“testCompile”已过时并已被替换 使用“testImplementation”。它将在 2018 年底被删除。对于 更多信息见: http://d.android.com/r/tools/update-dependency-configurations.html 受影响的模块:android-app
警告:配置“androidTestCompile”已过时且已被 替换为“androidTestImplementation”。它将在 2018 年底。有关更多信息,请参阅: http://d.android.com/r/tools/update-dependency-configurations.html 受影响的模块:android-app
警告:指定的 Android SDK 构建工具版本 (26.0.2) 是 忽略,因为它低于支持的最低版本 (28.0.3) Android Gradle 插件 3.3.1。 Android SDK Build Tools 28.0.3 将是 用过的。要禁止显示此警告,请删除“buildToolsVersion '26.0.2'” 从您的 build.gradle 文件中,作为 Android Gradle 的每个版本 插件现在有一个默认版本的构建工具。删除构建 工具版本和同步项目受影响的模块:android-app
我的安卓应用文件:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "fr.curie.jonquille.jonquille_curie"
minSdkVersion 18
targetSdkVersion 26
versionCode 203000
versionName "2.3.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:support-v4:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
compile 'com.android.support:design:26.0.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.2.4'
compile 'io.reactivex:rxkotlin:0.60.0'
compile 'com.jakewharton.rxbinding:rxbinding-kotlin:1.0.0'
compile 'com.jakewharton.rxbinding:rxbinding-support-v4-kotlin:1.0.0'
compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7-kotlin:1.0.0'
compile 'com.jakewharton.rxbinding:rxbinding-design-kotlin:1.0.0'
compile 'com.jakewharton.rxbinding:rxbinding-recyclerview-v7-kotlin:1.0.0'
compile 'com.tbruyelle.rxpermissions:rxpermissions:0.9.1@aar'
compile 'pl.charmas.android:android-reactive-location:0.10@aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.sdoward:rxgooglemaps:1.1.1@aar'
compile 'com.github.kittinunf.fuel:fuel:1.3.1'
compile 'com.github.kittinunf.fuel:fuel-android:1.3.1'
compile 'com.github.kittinunf.fuel:fuel-rxjava:1.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services-wallet:10.0.1'
compile 'com.stripe:stripe-android:2.0.2'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.twitter.sdk.android:twitter-core:3.1.1'
compile 'com.twitter.sdk.android:tweet-composer:3.1.1'
testCompile 'junit:junit:4.12'
}
repositories {
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
我的安卓文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.0.6'
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
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 {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
【问题讨论】:
标签: java android android-studio gradle kotlin