要跳轉的activity里面也有跳轉的監聽器按鈕
以下是Logcat的Error
2020-06-03 18:21:40.618 8297-8297/com.jxswkj.qy_speak E/AndroidRuntime: FATAL EXCEPTION: main Process: com.jxswkj.qy_speak, PID: 8297 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jxswkj.qy_speak/com.jxswkj.qy_speak.FengmianActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:555) at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:518) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:466) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.jxswkj.qy_speak.FengmianActivity.onCreate(FengmianActivity.java:22) at android.app.Activity.performCreate(Activity.java:7009) at android.app.Activity.performCreate(Activity.java:7000) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
uj5u.com熱心網友回復:
AndroidManifest.xml中已經注冊了專案中所有的activityuj5u.com熱心網友回復:
You need to use a Theme.AppCompat theme (or descendant) with this activity.這是日志中的錯誤提示。你在manifest中給那個活動加一個這個主題應該就可以了。“Theme.AppCompat ”
uj5u.com熱心網友回復:
多謝大佬指點,我去試試。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/28993.html
標籤:Android
上一篇:請問 ,Basic4Android中如何從SQLite資料表中查詢出某一列資料中不重復的專案,放入組合框控制元件spinner中?謝謝!
