【发布时间】:2019-01-15 04:01:05
【问题描述】:
我的 android 应用 Gradle 构建没有同步,因为我将我的 android studio 更新到 3.2。我已经更新了依赖项中的所有内容,但仍然出现相同的错误。这是我使用的依赖文件(包括第三方库)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
defaultConfig {
applicationId "myappid"
minSdkVersion 19
targetSdkVersion 28
versionCode 32
versionName "3.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.11"
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
implementation 'com.android.support:recyclerview-v7:28.0.0-alpha1'
implementation 'com.android.support:cardview-v7:28.0.0-alpha1'
implementation 'com.android.support:support-v4:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-crash:28.0.0-alpha1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "org.jetbrains.anko:anko:$anko_version"
implementation 'com.github.GrenderG:Toasty:1.2.5'
implementation 'com.github.scottyab:showhidepasswordedittext:0.8'
implementation 'com.daimajia.easing:library:2.1@aar'
implementation 'com.daimajia.androidanimations:library:2.3@aar'
implementation 'com.google.android.gms:play-services-ads:17.1.2'
implementation 'com.google.gms:google-services:4.2.0'
implementation 'com.github.sd6352051:NiftyDialogEffects:v1.0.3'
implementation 'net.steamcrafted:load-toast:1.0.12'
implementation 'com.android.support:animated-vector-drawable:28.0.0-alpha1';
}
//apply plugin: 'com.google.gms.google-services'
//classpath 'com.google.gms:google-services:4.2.0'
但是,我收到以下错误 此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 5.0 不兼容。 使用“--warning-mode all”显示个别弃用警告。
我已经尝试了大多数可通过 Google/Youtube 搜索获得的东西。也实现了 StackOverflow 中给出的几个答案。但归根结底,这是同样的错误。我错过了什么。
请指教,如何解决这个问题。谢谢
【问题讨论】:
-
提供完整的 Gradle 脚本。
-
@GokulNathKP 我已经更新了查询。好心检查。谢谢!
标签: android android-studio gradle