You need to use a Theme.AppCompat theme (or descendant) with this activity解决方法

简介: 版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/chaoyu168/article/details/51455746 报错如下:java.
版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/chaoyu168/article/details/51455746
报错如下:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.test2/com.example.test2.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

解决方法:
创建的activity是MainActivity extends ActionBarActivity这样的。把后面的ActionBarActivity改成Activity,然后导包,把下面报错的地方删掉运行就不报错了。
目录
相关文章
|
9天前
|
XML API Android开发
android上FragmentTabHost实现自定义Tab Indicator
android上FragmentTabHost实现自定义Tab Indicator
10 1
|
开发工具 Android开发
细说 AppCompat 主题引发的坑:You need to use a Theme.AppCompat theme with this activity!
细说 AppCompat 主题引发的坑:You need to use a Theme.AppCompat theme with this activity!
细说 AppCompat 主题引发的坑:You need to use a Theme.AppCompat theme with this activity!
|
Android开发
You need to use a Theme.AppCompat theme (or descendant) with this activity
You need to use a Theme.AppCompat theme (or descendant) with this activity
240 0
|
Android开发
【错误记录】Android 应用运行报错 ( You need to use a Theme.AppCompat theme (or descendant) with this activity. )
【错误记录】Android 应用运行报错 ( You need to use a Theme.AppCompat theme (or descendant) with this activity. )
521 0
【错误记录】Android 应用运行报错 ( You need to use a Theme.AppCompat theme (or descendant) with this activity. )
|
Android开发
【错误记录】Android Studio 编译报错 ( AppCompat does not support the current theme features )
【错误记录】Android Studio 编译报错 ( AppCompat does not support the current theme features )
273 0
【错误记录】Android Studio 编译报错 ( AppCompat does not support the current theme features )
【错误记录】Flutter 界面报错 ( No MediaQuery widget ancestor found. | Scaffold widgets require a MediaQuery )
【错误记录】Flutter 界面报错 ( No MediaQuery widget ancestor found. | Scaffold widgets require a MediaQuery )
355 0
【错误记录】Flutter 界面报错 ( No MediaQuery widget ancestor found. | Scaffold widgets require a MediaQuery )
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.
1362 0

热门文章

最新文章