2015-02-08 98 views
0

有谁知道如何解决这个错误?错误,当我尝试应用Theme.Holo.Light.NoActionBar

当我在AndroidManifest.xml中添加一行时,它不起作用。

android:theme="@android:style/Theme.Holo.Light.NoActionBar"> 

像这样。

<activity 
    android:name=".MainActivity" 
    android:label="@string/app_name" 
    android:theme="@android:style/Theme.Holo.Light.NoActionBar"> 
    <intent-filter> 
     <action android:name="android.intent.action.MAIN" /> 

     <category android:name="android.intent.category.LAUNCHER" /> 
    </intent-filter> 
</activity> 

我也试图改变

android:theme="@style/AppTheme" > 

android:theme="@style/Theme.AppCompat" > 

但还是不起作用。

enter image description here

+0

我可以使它工作的唯一方法是改变styles.xml文件 <样式名称= “AppTheme” 父=“主题。 AppCompat.Light.NoActionBar“> 这是唯一的方法吗? – wiz 2015-02-08 20:50:09

回答

1
public class MainActivity extends ActionBarActivity { ... 

ActionBarActivity变化活动

+0

非常感谢!这正是我想要的。 – wiz 2015-02-08 21:26:13

+0

跟我一样的男人。好学习 – 2015-02-08 22:54:21

相关问题