froyohuang / RePlugin-AndroidX

A RePlugin branch supports AndroidX 支持AndroidX的RePlugin框架分支
111 stars 16 forks source link

You need to use a Theme.AppCompat theme #5

Open MiroHuang opened 4 years ago

MiroHuang commented 4 years ago

host和plugin均使用'androidx.appcompat:appcompat:1.1.0',plugin继承PluginAppCompatActivity;host跳转到plugin会报错; 020-04-24 15:41:25.456 18918-18918/com.jxwdyf.host E/AndroidRuntime: FATAL EXCEPTION: main Process: com.jxwdyf.host, PID: 18918 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jxwdyf.host/com.jxwdyf.host.loader.a.ActivityN1NRNTS3}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2747) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:165) at android.app.ActivityThread.main(ActivityThread.java:6375) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802) 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:696) at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:659) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:552) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161) at com.test.android.plugin1.MainActivity.onCreate(MainActivity.java:30) at android.app.Activity.performCreate(Activity.java:6845) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2700

MiroHuang commented 4 years ago

问题已解决!

ftyan805614 commented 4 years ago

问题已解决!

怎么解决的 继承PluginAppCompatActivity 7.0系统启动不了

MiroHuang commented 4 years ago

你现在遇见什么问题呢?我并没有使用PluginAppCompatActivity

在 2020-07-30 10:26:25,"ftyan805614" notifications@github.com 写道:

问题已解决!

怎么解决的 继承PluginAppCompatActivity 7.0系统启动不了

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.