Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on Android targetSdkVersion=23 #186

Open
andersdp opened this issue Nov 23, 2015 · 9 comments
Open

Crashes on Android targetSdkVersion=23 #186

andersdp opened this issue Nov 23, 2015 · 9 comments

Comments

@andersdp
Copy link

Drawer works fine in simulator when testing with Android 6.0 (Marshmallow) and targetSdkVersion=23 but doing the same on a device the app crashes during startup. And due to a bug in the titanium SDK the console shows no output: https://jira.appcelerator.org/browse/TIMOB-19821 so it's kind of hard to know whats going on.

Does the module need to be build against Android 6.0?

@viezel
Copy link
Owner

viezel commented Nov 24, 2015

I would recommend using Ti.DrawerLayout for android. Its more stable and maintained.
https://github.com/manumaticx/Ti.DrawerLayout

@jojomi
Copy link

jojomi commented Feb 16, 2016

It fails for me too:

[ERROR] :  TiApplication: Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
[ERROR] :  TiApplication:   at android.view.ViewGroup.addViewInner(ViewGroup.java:3937)
[ERROR] :  TiApplication:   at android.view.ViewGroup.addView(ViewGroup.java:3787)
[ERROR] :  TiApplication:   at android.view.ViewGroup.addView(ViewGroup.java:3759)
[ERROR] :  TiApplication:   at dk.napp.drawer.Drawer.processProperties(Drawer.java:365)

Is there any chance for a fixed version? Is it perhaps only a matter of recompiling for current versions of Appcelerator and Android?

@mattlanham
Copy link

+1

@mattlanham
Copy link

Would be great to have this fixed, here's the error I am getting:

[ERROR] :  TiApplication: (main) [607,711] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getWidth()' on a null object reference; Titanium 5.2.1,2016/03/18 22:51,23e1c7d
[ERROR] :  TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getWidth()' on a null object reference
[ERROR] :  TiApplication:   at com.slidingmenu.lib.CustomViewBehind.getSecondaryBehindWidth(CustomViewBehind.java:80)
[ERROR] :  TiApplication:   at com.slidingmenu.lib.CustomViewBehind.scrollBehindTo(CustomViewBehind.java:251)
[ERROR] :  TiApplication:   at com.slidingmenu.lib.CustomViewAbove.scrollTo(CustomViewAbove.java:806)
[ERROR] :  TiApplication:   at com.slidingmenu.lib.CustomViewAbove.onSizeChanged(CustomViewAbove.java:468)
[ERROR] :  TiApplication:   at android.view.View.sizeChange(View.java:16748)
[ERROR] :  TiApplication:   at android.view.View.setFrame(View.java:16710)
[ERROR] :  TiApplication:   at android.view.View.layout(View.java:16627)
[ERROR] :  TiApplication:   at android.view.ViewGroup.layout(ViewGroup.java:5437)
[ERROR] :  TiApplication:   at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
[ERROR] :  TiApplication:   at android.view.View.layout(View.java:16630)
[ERROR] :  TiApplication:   at android.view.ViewGroup.layout(ViewGroup.java:5437)
[ERROR] :  TiApplication:   at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
[ERROR] :  TiApplication:   at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
[ERROR] :  TiApplication:   at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
[ERROR] :  TiApplication:   at android.view.View.layout(View.java:16630)
[ERROR] :  TiApplication:   at android.view.ViewGroup.layout(ViewGroup.java:5437)
[ERROR] :  TiApplication:   at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2171)
[ERROR] :  TiApplication:   at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1931)
[ERROR] :  TiApplication:   at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
[ERROR] :  TiApplication:   at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
[ERROR] :  TiApplication:   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
[ERROR] :  TiApplication:   at android.view.Choreographer.doCallbacks(Choreographer.java:670)
[ERROR] :  TiApplication:   at android.view.Choreographer.doFrame(Choreographer.java:606)
[ERROR] :  TiApplication:   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
[ERROR] :  TiApplication:   at android.os.Handler.handleCallback(Handler.java:739)
[ERROR] :  TiApplication:   at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR] :  TiApplication:   at android.os.Looper.loop(Looper.java:148)
[ERROR] :  TiApplication:   at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

@mattlanham
Copy link

Little bit more info with regards to my error, is that it stops happening if I define leftWindow, but actually I only want it to open from the right. Any ideas @viezel

@natefollmer
Copy link

Still occurring with 1.1.7 update.

@Murtuzasaifee
Copy link

Murtuzasaifee commented Jun 17, 2016

Any update regarding this issue. I m facing the same issue of getwidth(). @viezel any updates please.

@dieskim
Copy link

dieskim commented Jul 14, 2016

The rightWindow has been broken since 1.1.3 and when you set it it just causes the app to crash - as soon as you revert to leftWindow it works fine

@ikalangita
Copy link

Aaaarhhhh, i finished my app on ios and know when testing on android, i have same issue, any fix found by someone else? i start to asks myself if using titanium is not a waste of time because i should now re-code all my app for both platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants