ricardoalcocer / actionbarextras

Titanium Android Native Module that exposes ActionBar features not exposed by the Titanium SDK
MIT License
149 stars 60 forks source link

WARNINGS since Android6 #102

Closed AppWerft closed 8 years ago

AppWerft commented 8 years ago

Hi Manuel, hi Ricardo,

since I compile with SDK5.2.0.GA. This warnings comes on console:

[WARN] :   W/System.err: java.lang.ClassCastException: org.appcelerator.titanium.TiActivity cannot be cast to android.support.v7.app.ActionBarActivity
[WARN] :   W/System.err:    at com.alcoapps.actionbarextras.ActionbarextrasModule.getActionBar(ActionbarextrasModule.java:103)
[WARN] :   W/System.err:    at com.alcoapps.actionbarextras.ActionbarextrasModule.handleSetTitle(ActionbarextrasModule.java:186)
[WARN] :   W/System.err:    at com.alcoapps.actionbarextras.ActionbarextrasModule.handleMessage(ActionbarextrasModule.java:118)
[WARN] :   W/System.err:    at android.os.Handler.dispatchMessage(Handler.java:98)
[WARN] :   W/System.err:    at android.os.Looper.loop(Looper.java:135)
[WARN] :   W/System.err:    at android.app.ActivityThread.main(ActivityThread.java:5255)
[WARN] :   W/System.err:    at java.lang.reflect.Method.invoke(Native Method)
[WARN] :   W/System.err:    at java.lang.reflect.Method.invoke(Method.java:372)
[WARN] :   W/System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
[WARN] :   W/System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
mpociot commented 8 years ago

Are you sure you're using the latest version of the module?

It no longer gets casted to ActionBarActivity but to AppCompatActivity instead, which should work just fine.

Here's the commit: https://github.com/ricardoalcocer/actionbarextras/commit/84b13c4c1db00a56d551e80a89864a1e1918a763

AppWerft commented 8 years ago

I'm not sure. And I have tested. I'm using the newest one. 1.6.9

manumaticx commented 8 years ago

Marcel is right. ActionBarActivity is not used anymore. That error was fixed in 1.6.8

AppWerft commented 8 years ago

Yes it was my failure, I selected a fixed version. Now it runs without warnings