错误 java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
将style文件中加
<style name="Theme.AppCompat.Light.NoActionBar" parent="@style/Theme.AppCompat.Light">
<item name="android:windowNoTitle">true</item>
</style>
在AndroidManifest.xml中配置
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
例如:
<application
android:name="com.txunda.ecityshop.application.MyApplication"
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" >
本文介绍了解决在Android应用中遇到的使用AppCompat主题时出现的错误方法。通过在style文件中定义Theme.AppCompat.Light.NoActionBar主题,并在AndroidManifest.xml中为应用程序设置此主题来避免错误。
815

被折叠的 条评论
为什么被折叠?



