目前,我的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'' –