Theme.AppCompat.Light.DarkActionBar 无法解析符号



Android Studio 强调 主题.应用兼容.光.黑暗行动栏 无法解析符号

我的 Android Studio 版本是 2.2,Gradle 版本是 3.3,我安装了最新的 Android 支持存储库 (47.0.0)。我正在使用的应用程序兼容-v7:25.3.1 库在 SDK 文件夹中可用。

请帮助解决此问题。

我的build.grade文件是: 应用插件:"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'
}

我的风格.xml是:

<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>

当我尝试在我的风格上使用 ThemeOverlay.AppCompat.Dark.ActionBar 时,我在运行 Kotlin 时遇到了同样的问题。 只有当我将minSdkVersion 表单 15 更改为 17时,我才能修复它。 如果没有这种变化,Gradle就会无限循环。 谢谢。

我正在与: 安卓工作室 3.0.1 版本 #AI-171.4443003,构建于 2017 年 11 月 9 日 JRE: 1.8.0_152-release-915-b01 amd64 JVM: OpenJDK 64-bit Server VM by JetBrains s.r.o 视窗 10 10.0

最新更新