Ji Yicheng
Ji Yicheng

Reputation: 65

cannot resovl symbol R

i know this is an old question and i search this kind of question online but nothing worked for me so i turn to here for help.

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'

}

here is the error result enter image description here

Upvotes: 0

Views: 65

Answers (3)

Ji Yicheng
Ji Yicheng

Reputation: 65

final solution

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
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'
compile 'com.android.support:design:23.1.0'
}

thanks your guys!

Upvotes: 0

king
king

Reputation: 507

Add this in your dependencies: compile 'com.android.support:design:23.1.0'

Upvotes: 0

Charllon Lobo
Charllon Lobo

Reputation: 89

Try to use the same compileSdkVersion and targetSdkVersion.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.2'
    defaultConfig {
        applicationId "com.example.ji.myapplication19"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

Upvotes: 1

Related Questions