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

crash on devices of Sony series #33

Closed
qluan opened this issue Dec 23, 2014 · 6 comments
Closed

crash on devices of Sony series #33

qluan opened this issue Dec 23, 2014 · 6 comments

Comments

@qluan
Copy link

qluan commented Dec 23, 2014

12-18 02:28:50.665 E/AndroidRuntime( 2571): Caused by: java.lang.NullPointerException
12-18 02:28:50.665 E/AndroidRuntime( 2571): at org.apmem.tools.layouts.FlowLayout.getLayoutDirection(FlowLayout.java:410)
12-18 02:28:50.665 E/AndroidRuntime( 2571): at android.view.View.resolveLayoutDirectionIfNeeded(View.java:9689)
12-18 02:28:50.665 E/AndroidRuntime( 2571): at android.view.View.getResolvedLayoutDirection(View.java:4872)
12-18 02:28:50.665 E/AndroidRuntime( 2571): at android.view.View.setPaddingRelative(View.java:12092)
12-18 02:28:50.665 E/AndroidRuntime( 2571): at android.view.View.setPadding(View.java:12003)
12-18 02:28:50.665 E/AndroidRuntime( 2571): at android.view.ViewGroup.setPadding(ViewGroup.java:2379)
12-18 02:28:50.665 E/AndroidRuntime( 2571): at android.view.View.(View.java:3154)
12-18 02:28:50.665 E/AndroidRuntime( 2571): at android.view.View.(View.java:2781)
12-18 02:28:50.665 E/AndroidRuntime( 2571): at android.view.ViewGroup.(ViewGroup.java:412)
12-18 02:28:50.665 E/AndroidRuntime( 2571): at org.apmem.tools.layouts.FlowLayout.(FlowLayout.java:32)
12-18 02:28:50.665 E/AndroidRuntime( 2571): ... 28 more

@qluan
Copy link
Author

qluan commented Dec 23, 2014

Just on Sony Devices

@ApmeM
Copy link
Owner

ApmeM commented Dec 23, 2014

Can you please try to use latest commit from this repository (or at least commit with fix "[FIX] #30 Cant apply android:background to FlowLayout") there were a problem with getLayoutDirection. I think it should help you.

@ApmeM
Copy link
Owner

ApmeM commented Dec 23, 2014

It looks like it is common in android world to call virtual methods in constructors...
Originally this problem appears on setBackground method, but now it looks like on setPadding method.

@ApmeM
Copy link
Owner

ApmeM commented Dec 23, 2014

BTW what android versions are you using on your devices?
I think this problem appears in API level 17 (android 4.2.2) and maybe fixed in latest versions (4.3.1 and more).
.

@qluan
Copy link
Author

qluan commented Dec 24, 2014

It occurs on Sony devices, mostly version 4.0.4 . Maybe it is not the primary system.It's very common in china.
crash shotcut

@qluan
Copy link
Author

qluan commented Dec 24, 2014

It works, thanks very much

@qluan qluan closed this as completed Dec 24, 2014
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

2 participants