当前位置: 代码迷 >> Android >> android设置界面全屏时IDE报错,该如何处理
  详细解决方案

android设置界面全屏时IDE报错,该如何处理

热度:101   发布时间:2016-04-28 07:19:24.0
android设置界面全屏时IDE报错
<activity?android:name=".Activity2"?android:theme="@android:style/android.NoTitleBar.Fullscreen"></activity>?

报错:Error:?No?resource?found?that?matches?the?given?name?([email protected]:style/android.NoTitleBar.Fullscreen').

style文件:
<resources>
?<!--
?Base?application?theme,?dependent?on?API?level.?This?theme?is?replaced
?by?AppBaseTheme?from?res/values-vXX/styles.xml?on?newer?devices.
?-->
?<style?name="AppBaseTheme"?parent="android:Theme.Light">
?<!--
?Theme?customizations?available?in?newer?API?levels?can?go?in
?res/values-vXX/styles.xml,?while?customizations?related?to
?backward-compatibility?can?go?here.
?-->
?</style>
?<!--?Application?theme.?-->
?<style?name="AppTheme"?parent="AppBaseTheme">
?<!--?All?customizations?that?are?NOT?specific?to?a?particular?API-level?can?go?here.?-->
?</style>
</resources>
xml?界面

------解决方案--------------------
android:style/android.NoTitleBar.Fullscreen不能这么写吧
android:style/android.NoTitleBar这样写应该就行
------解决方案--------------------
哎,自己写错了,android:style/Theme.NoTitleBar.Fullscreen,搞得我以为你sdk加载错了,,,
------解决方案--------------------
刚试了一下,根本就没有你这个style啊,我用的这个android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
下面这两个没试
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
  相关解决方案