【发布时间】:2018-06-23 05:36:12
【问题描述】:
所以,我在运行 Android 项目时遇到了问题。据说 那个
所有 com.android.support 库必须使用完全相同的版本 规范(混合版本可能导致运行时崩溃)。成立 版本 27.1.1、26.1.0。例子包括 com.android.support:animated-vector-drawable:27.1.1 和 com.android.support:support-media-compat:26.1.0
我在 .\idea\libraries 中找到了一个文件 >>>>> com_android_support_support_media_compat_26_1_0
我曾尝试将 com.android.support:support-media-compat:26.1.0 的文件删除或重命名为 27.1.1,但失败了。
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.sbyparking.car.surabayaparking"
minSdkVersion 21
targetSdkVersion 27
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'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
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.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:gridlayout-v7:27.1.1'
}
你们有什么想法我该怎么做吗?因为我是 Android Studio 的新手。 提前致谢
【问题讨论】:
-
我遇到了同样的问题,所以我临时做了
//noinspection GradleCompatible implementation 'com.android.support:support-compat:27.1.1'