我正在使用此主題generator爲我的Titanium應用程序創建自定義主題。但是當我運行我的應用程序時,它崩潰了,我的日誌說我需要appCompact
,即使我爲sdk> sdk 11設置主題。java.lang.IllegalStateException:您需要在此活動中使用Theme.AppCompat主題(或後代)。鈦
而我的Android版本定位爲API 19,min SDK版本爲API14,爲什麼我需要appCompact
。
這是我的日誌說:
[ERROR] : TiApplication: (main) [512,512] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{a.s/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.; Titanium 3.4.0,2014/09/25 16:42,b54c467
[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{a.s/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(Activ
[ERROR] : TiApplication: at android.app.ActivityThread.access$800(ActivityThread.java:135)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:136)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5017)
[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:515)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
[ERROR] : TiApplication: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
[ERROR] : TiApplication: at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:108)
[ERROR] : TiApplication: at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:57)
[ERROR] : TiApplication: at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:516)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:5231)
[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
[ERROR] : TiApplication: ... 11 more
你可以提供你的'tiapp.xml'和你放置生成的主題的路徑。 – turtle 2014-11-03 04:01:31
APPNAME/platform/android/res/values – Tony 2014-11-03 08:53:43