我知道這是一個老問題,我在網上搜索這種問題,但沒有爲我工作,所以我轉向這裏尋求幫助。不能resovl符號R
的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.example.ji.myapplication19"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
productFlavors {}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
}
嘗試編譯>乾淨的項目,然後編譯>重建....這可能有幫助 – theMatus
可能重複[R無法解析 - Android錯誤](http://stackoverflow.com/questions/885009/r-cannot -be-resolved-android-error) – ChrisStillwell