2

Android Studio highlights that Theme.AppCompat.Light.DarkActionBar Cannot resolve symbol

My Android Studio version is 2.2 and the Gradle version is 3.3 I have the latest Android Support Repository (47.0.0) installed. The app-compat-v7:25.3.1 library which I am using is available in the SDK folder.

Please help resolve this issue.

My build.grade file is: apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.app"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:25.3.1'
    testCompile 'junit:junit:4.12'
}

My styles.xml is:

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>

    </style>
    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
Vincy
  • 189
  • 2
  • 5

1 Answers1

0

I had the same problem running Kotlin when I tried to used the ThemeOverlay.AppCompat.Dark.ActionBar on my style. I was able to fix it only when I changed the minSdkVersion form 15 to 17. Without this change the Gradle goes on infinite loop. Thanks.

I am working with: Android Studio 3.0.1 Build #AI-171.4443003, built on November 9, 2017 JRE: 1.8.0_152-release-915-b01 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0

Fernando Camargo
  • 131
  • 1
  • 1
  • 3