Cannot resolve symbol R and can't solve it

  • I tried to solve this by trying solutions suggested in other questions but stil not able to get it. * In the console I'am getting this message

    Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources] Error:No resource identifier found for attribute 'roundIcon' in package 'android' Error:No resource identifier found for attribute 'roundIcon' in package 'android' Error:Execution failed for task ':app:processDebugResources'. Failed to execute aapt Information:BUILD FAILED Information:Total time: 6.496 secs Information:3 errors Information:0 warnings Information:See complete output in console

and my build.gradle

android {
    compileSdkVersion 24
    buildToolsVersion '25.0.0'
    defaultConfig {
        applicationId smth
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner ""
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), ''
    configurations.all {
        resolutionStrategy.force ''

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('', {
        exclude group: '', module: 'support-annotations'
    compile ''
    compile ''
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile ''
    testCompile 'junit:junit:4.12'

And for my

import android.os.Bundle;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextWatcher;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.ProgressBar;

public class MainActivity extends AppCompatActivity {

    protected void onCreate(Bundle savedInstanceState) {

and for the manifest.xml

        <activity android:name=".MainActivity">
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />

1 answer

  • answered 2017-11-13 05:52 LVS

    roundIcon is attributes in Android 8.0 (Oreo). If you want use roundIcon then so must change minSdkVersion and targetSdkVersion up to 25 in your app build.gradle. And if you want support old version whose will need remove android:roundIcon and use android:icon for old version. fix roundIcon in android 8.0