-2
我運行片段的例子,在模擬器運行時,它說,遺憾的是應用程序已經停止在一個特定的應用程序的Android,它說,遺憾的是應用程序已經停止
09-30 14:15:19.518: D/AndroidRuntime(336): Shutting down VM
09-30 14:15:19.528: W/dalvikvm(336): threadid=1: thread exiting with uncaught exception (group=0x40015560)
09-30 14:15:19.538: E/AndroidRuntime(336): FATAL EXCEPTION: main
09-30 14:15:19.538: E/AndroidRuntime(336): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aust.myfragments/com.aust.myfragments.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
09-30 14:15:19.538: E/AndroidRuntime(336): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
09-30 14:15:19.538: E/AndroidRuntime(336): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
09-30 14:15:19.538: E/AndroidRuntime(336): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
09-30 14:15:19.538: E/AndroidRuntime(336): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
09-30 14:15:19.538: E/AndroidRuntime(336): at android.os.Handler.dispatchMessage(Handler.java:99)
09-30 14:15:19.538: E/AndroidRuntime(336): at android.os.Looper.loop(Looper.java:123)
09-30 14:15:19.538: E/AndroidRuntime(336): at android.app.ActivityThread.main(ActivityThread.java:3647)
09-30 14:15:19.538: E/AndroidRuntime(336): at java.lang.reflect.Method.invokeNative(Native Method)
09-30 14:15:19.538: E/AndroidRuntime(336): at java.lang.reflect.Method.invoke(Method.java:507)
09-30 14:15:19.538: E/AndroidRuntime(336): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-30 14:15:19.538: E/AndroidRuntime(336): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-30 14:15:19.538: E/AndroidRuntime(336): at dalvik.system.NativeStart.main(Native Method)
09-30 14:15:19.538: E/AndroidRuntime(336): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
09-30 14:15:19.538: E/AndroidRuntime(336): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:110)
09-30 14:15:19.538: E/AndroidRuntime(336): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:99)
09-30 14:15:19.538: E/AndroidRuntime(336): at com.aust.myfragments.MainActivity.onCreate(MainActivity.java:12)
09-30 14:15:19.538: E/AndroidRuntime(336): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-30 14:15:19.538: E/AndroidRuntime(336): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
09-30 14:15:19.538: E/AndroidRuntime(336): ... 11 more