我在Android Studio中出现以下错误,而且我真的不知道自己在做什么错:
我试图进行一个干净的项目,但是并不能解决问题。
这里有我的礼物:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.cityguidetour"
minSdkVersion 21
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'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.jakewharton:butterknife:10.1.0'
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 fileTree(dir: 'libs', include: ['*.jar'])
}
请帮忙吗?
答案 0 :(得分:0)
最后,我不得不删除该项目并在Android Studio中创建一个新项目来克服此问题。
答案 1 :(得分:-1)
一旦尝试
Build-> Clean Project
Build -> Rebuild project
Build -> Clean Project
and restart android studio with File -> invalidate cache /Restart