use*_*108 3 android-appcompat android-studio
我是Android工作室的初学者,昨天安装了它.然后我创建了一个工作得很好的空项目.今天我不得不更新,现在我正在与该错误消息作斗争:
如您所见,我已经包含了示例.我有什么想法可以解决这个问题吗?这里是完整的app.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
defaultConfig {
applicationId "at.sumser.fateandlove"
minSdkVersion 15
targetSdkVersion 28
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"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0-beta01'
implementation 'com.android.support:support-media-compat:26.1.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0-beta01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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.google.android.gms:play-services-location:15.0.1'
}
Run Code Online (Sandbox Code Playgroud)
有趣的是,它告诉我在SDK为28时添加'com.android.support:support-media-compat:26.1.0'?有任何想法吗?
更新 这里也是build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.41'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
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 {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
现在'com.android.support:support-media-compat:26.1.0'也告诉我一个问题:

问题:Google不测试他们的版本吗?或Android Studio中的自动修复程序刚刚崩溃?我现在失去了近3个小时来找到解决这个问题的方法......
我在更新到AppCompat版本28时遇到了同样的问题.
首先,我建议使用最新版本而28.0.0-rc01不是28.0.0-beta01.
如果您仍然收到警告,所有库必须使用完全相同的版本规范,您可以强制使用相应库的最新版本.
您可以通过在应用程序build.gradle文件中添加解决方案策略来完成android { }此操作,如下所示:
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:28.0.0-rc01'
force 'com.android.support:support-media-compat:28.0.0-rc01'
force 'com.android.support:customtabs:28.0.0-rc01'
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2357 次 |
| 最近记录: |