目前,我的styles.xml文件显示不正确。 Theme.AppCompat.Light.NoActionBar
无法解析。我已经重新启动android studio,但它仍然无法工作。我试过无效缓存/重启,但它不起作用。它不会让我的应用程序崩溃,但它为什么会发生。看看下面的图片:我的风格有什么问题?无法解析符号Theme.AppCompat.Light.NoActionBar
这是我的build.gradle文件
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "xx.com.xxx.xxxx"
minSdkVersion 17
targetSdkVersion 23
versionCode 21
versionName "1.2.0"
renderscriptTargetApi 23
renderscriptSupportModeEnabled true
// Enabling multidex support.
multiDexEnabled true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('com.afollestad.material-dialogs:core:[email protected]') {
transitive = true
}
compile('com.mikepenz:actionitembadge:[email protected]') {
transitive = true
}
compile project(':blurringview')
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.android.support:palette-v7:23.3.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.wdullaer:materialdatetimepicker:1.5.1'
compile 'com.pnikosis:materialish-progress:1.5'
compile 'com.mikepenz:iconics:[email protected]'
compile 'com.mikepenz.iconics:community-material-typeface:[email protected]'
compile 'com.soundcloud.android:android-crop:[email protected]'
compile 'org.apache.commons:commons-lang3:3.4'
...
}
...
}
你可以在这里显示你的build.gradle文件。 – Soham
我假设你忘了在build.gradle中加入:compile'com.android.support:appcompat-v7:XX.XX.XX'。观看版本信息:https://developer.android.com/topic/libraries/support-library/features.html#v7-appcompat – David
没有@大卫。我拥有它。在我的build.gradle文件中是'compile'com.android.support:appcompat-v7:23.3.0'' –