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

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,然後導包,把下面報錯的地方刪掉運行就不報錯了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章