在android studio上编译失败
我正在使用android studio。当我编译它时,它将终止进程。我在build.gradle有错误。有人能帮我解决这个问题吗?多谢各位 这是我的身材,格雷德尔在android studio上编译失败,android,android-gradle-plugin,Android,Android Gradle Plugin,我正在使用android studio。当我编译它时,它将终止进程。我在build.gradle有错误。有人能帮我解决这个问题吗?多谢各位 这是我的身材,格雷德尔 apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.example.myapplication" minSdkVers
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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 'com.edwardvanraak:MaterialBarcodeScanner:0.0.6-ALPHA'
implementation 'cz.msebera.android:httpclient:4.3.6'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.koushikdutta.ion:ion:2.+'
implementation 'com.journeyapps:zxing-android-embedded:3.4.0'
implementation 'com.google.android.gms:play-services-location:7.+'
implementation 'org.jsoup:jsoup:1.9.2'
implementation 'com.github.f0ris.sweetalert:library:1.5.1'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.google.android.gms:play-services:9.8.0'
}
以下是错误:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 24.0.0, 23.0.1. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:mediarouter-v7:24.0.0 less... (Ctrl+F1)
Inspection info:There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion).
Issue id: GradleCompatible
将这些添加到依赖项中
implementation "com.android.support:design:28.0.0"
implementation "com.android.support:support-v4:28.0.0"
implementation "com.android.support:mediarouter-v7:28.0.0"
implementation "com.android.support:customtabs:28.0.0"
迁移到androidx对我来说很好 为此,请转到功能区中的“重构”选项,然后单击“移植到AndroidX”。如果您是AndroidX新手,请在收到请求时保存项目副本,然后进行迁移 这将更改对androidx工件的依赖关系,并解决您的问题。的可能重复项