alibaba / atlas

A powerful Android Dynamic Component Framework.
Apache License 2.0
8.13k stars 1.48k forks source link

[use]: #244

Closed candledragle closed 6 years ago

candledragle commented 6 years ago
02-02 11:43:31.413 27806-27806/com.taobao.demo E/CrashManager: force stop
02-02 11:43:31.423 27806-27806/com.taobao.demo E/AndroidRuntime: FATAL EXCEPTION: main
                                                                 Process: com.taobao.demo, PID: 27806
                                                                 java.lang.RuntimeException: 1.0.0
                                                                     at android.taobao.atlas.runtime.ActivityThreadHook.handleMessage(ActivityThreadHook.java:323)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                     at android.os.Looper.loop(Looper.java:135)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5248)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
                                                                  Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.taobao.demo/com.example.myapplication.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2315)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2375)
                                                                     at android.app.ActivityThread.access$800(ActivityThread.java:147)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
                                                                     at android.taobao.atlas.runtime.ActivityThreadHook.handleMessage(ActivityThreadHook.java:269)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                     at android.os.Looper.loop(Looper.java:135) 
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5248) 
                                                                     at java.lang.reflect.Method.invoke(Native Method) 
                                                                     at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) 
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 
                                                                  Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
                                                                     at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:359)
                                                                     at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:328)
                                                                     at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289)
                                                                     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
                                                                     at com.example.myapplication.MainActivity.onCreate(MainActivity.java:11)
                                                                     at android.app.Activity.performCreate(Activity.java:5939)
                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
                                                                     at android.taobao.atlas.runtime.InstrumentationHook.callActivityOnCreate(InstrumentationHook.java:666)
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2375) 
                                                                     at android.app.ActivityThread.access$800(ActivityThread.java:147) 
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283) 
                                                                     at android.taobao.atlas.runtime.ActivityThreadHook.handleMessage(ActivityThreadHook.java:269) 
                                                                     at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                     at android.os.Looper.loop(Looper.java:135) 
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5248) 
                                                                     at java.lang.reflect.Method.invoke(Native Method) 
                                                                     at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) 
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 
candledragle commented 6 years ago

添加AppTheme主题后好了