Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (3.4.0)
Viewing all articles
Browse latest Browse all 66

Custom Android Theme, what to change for upgrade (3.2.0 -> 3.3.x or 3.4.x)

$
0
0

Hi guys,

at the moment, i'm troubling around with my custom theme which has successfully worked for 3.2.x.

So which changes do I have to make, when I face this error message:

[WARN] :   dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40ca7378)
[ERROR] :  TiApplication: (main) [827,1275] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{ch.farmerguide.mobile/org.appcelerator.titanium.TiTranslucentActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.; Titanium 3.3.0,2014/07/11 12:36,787cd39
[ERROR] :  TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{ch.farmerguide.mobile/org.appcelerator.titanium.TiTranslucentActivity}: 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:2071)
[ERROR] :  TiApplication:   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096)
[ERROR] :  TiApplication:   at android.app.ActivityThread.access$600(ActivityThread.java:138)
[ERROR] :  TiApplication:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
[ERROR] :  TiApplication:   at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] :  TiApplication:   at android.os.Looper.loop(Looper.java:213)
[ERROR] :  TiApplication:   at android.app.ActivityThread.main(ActivityThread.java:4787)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
[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:511)
[ERROR] :  TiApplication:   at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] :  TiApplication:   at android.app.Activity.performCreate(Activity.java:5008)
[ERROR] :  TiApplication:   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
[ERROR] :  TiApplication:   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2035)
[ERROR] :  TiApplication:   ... 11 more
The interesting line should be:
[ERROR] :  TiApplication: (main) [827,1275] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{ch.farmerguide.mobile/org.appcelerator.titanium.TiTranslucentActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.; Titanium 3.3.0,2014/07/11 12:36,787cd39
I created the android theme with this page: http://android-holo-colors.com/

And currently I'm having this directory structure in my (alloy) app: ~~~ / platform / | /android/ | /res/ | /drawable-*/ (all the drawable-hdpi etc. stuff) /layout/ /values/ (here are the interesting files i guess)

Regarding Titanium Documentation (http://docs.appcelerator.com/titanium/release-notes/?version=3.3.0.GA#themes) I try to change all the styles like parent="android:Widget.Holo.Spinner" (or any other parent="android:Widget.*") with parent="Theme.AppCompat.Light.*" but still getting the same error.

So any ideas?

The files in /platform/ and tiapp.xml are stored here: https://dl.dropboxusercontent.com/u/7800287/customtheme_android_titanium_problem.zip


Viewing all articles
Browse latest Browse all 66

Trending Articles