在Android Studio 3.3.1中导入旧项目后出错 依赖关系{ 实现fileTreedir:'libs',包括:['*.jar'] 测试实现'junit:junit:4.12' 实现'com.android.support:appcompat-v7:23.3.0' 实现'com.android.support:support-v4:23.3.0' 实现'com.android.support:design:23.3.0' }
在Android Studio 3.3.1中导入旧项目后出错 依赖关系{ 实现fileTreedir:'libs',包括:['*.jar'] 测试实现'junit:junit:4.12' 实现'com.android.support:appcompat-v7:23.3.0' 实现'com.android.support:support-v4:23.3.0' 实现'com.android.support:design:23.3.0' },android,android-studio,Android,Android Studio,单击图像放大此错误是因为您的CompileSDK版本与支持库版本不同。错误显示您的CompileSDK版本为28,因此要解决此问题,您的gradle中应该有类似的内容: android { compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { applicationId "com.project.sample" minSdkVersion 16 targetSdkVe
单击图像放大此错误是因为您的CompileSDK版本与支持库版本不同。错误显示您的CompileSDK版本为28,因此要解决此问题,您的gradle中应该有类似的内容:
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.project.sample"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
}
最新的buildToolsVersion是28.0.3,但您可以将其更改为自己的版本。它应该以28开头。这是因为SDK 28版本不如…27稳定 将编译和目标版本设置为27
android {
compileSdkVersion 27
buildToolsVersion '27.0.0'
defaultConfig {
applicationId "com.project.sample"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support:support-v4:27.0.0'
implementation 'com.android.support:design:27.0.0'
}
这里有一个图片链接。非常感谢你的回复。。我犯了一些错误,现在我有了一个不同的问题。