Android FC report: interface not implemented - android

Just received the below crash report on the Android dev console, however it doesn't hit my code and reports doesn't show Android version:
Checked source code for 4.1.x and 4.0.x, line 345 is this and length() is defined in an interface:
return getText().length();
How could this actually be missing? I'm assuming I've used a setText() on something and it's not ok, but do I investigate, while I've no clue where it's actually happening!?
java.lang.IncompatibleClassChangeError: interface not implemented
at android.text.BoringLayout.getLineStart(BoringLayout.java:345)
at android.text.Layout.drawText(Layout.java:229)
at android.text.Layout.draw(Layout.java:205)
at android.text.BoringLayout.draw(BoringLayout.java:400)
at android.widget.TextView.onDraw(TextView.java:4886)
at android.view.View.draw(View.java:13470)
at android.view.View.draw(View.java:13354)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13575)
at android.widget.FrameLayout.draw(FrameLayout.java:467)
at android.widget.ScrollView.draw(ScrollView.java:1569)
at android.view.View.draw(View.java:13354)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13473)
at android.widget.FrameLayout.draw(FrameLayout.java:467)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2185)
at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2258)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2153)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2021)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1832)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4899)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
at dalvik.system.NativeStart.main(Native Method)

This could possibly be due to change in library that android.text.BoringLayout is a part of. May be the interfaces that class implements have changed it's method signature or have added new methods or have changed it's accessibility rights (public protected private).
The devices this might be happening on may be hosting custom roms developed by independent users with different definitions given to one of the interfaces implemented by BinaryLayout or one of it's superclasses.
A backward binary compatibility case

Related

ArrayMap api level 16 [duplicate]

I get an error in my code with this logcat:
java.lang.NoClassDefFoundError: android.util.ArrayMap
at it.dd.multiplayerit.MainActivity.<init>(MainActivity.java:88)
at it.dd.multiplayerit.SwipeMainFragment$SectionsPagerAdapter.getItem(SwipeMainFragment.java:200)
at android.support.v4.app.FragmentPagerAdapter.instantiateItem(FragmentPagerAdapter.java:97)
at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:832)
at android.support.v4.view.ViewPager.populate(ViewPager.java:982)
at android.support.v4.view.ViewPager.populate(ViewPager.java:914)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1436)
at android.view.View.measure(View.java:15284)
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.onMeasure(CustomViewAbove.java:456)
at android.view.View.measure(View.java:15284)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:665)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:447)
at android.view.View.measure(View.java:15284)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4816)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:15284)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:861)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:602)
at android.view.View.measure(View.java:15284)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4816)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2367)
at android.view.View.measure(View.java:15284)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1867)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1111)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1292)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1009)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4236)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4872)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
I think that the problem is the autocompletetextview i created. I mapped the array to get the position of array when i click in the dropdown during type what i want search.
At line 88 i have this:
ArrayMap<String, Integer>myArrayMap = new ArrayMap<String, Integer>();
The crash seems to be only with android 4.1 version. Is there any incompatibility?
ArrayMap was introduced in Api level 19, but it was also released in the compatibility library v4, so it would be enough to change the import to android.support.v4.util.ArrayMap instead of android.util.ArrayMap
For now it migrates to AndroidX.
Instead of android.util.ArrayMap you will write androidx.collection.ArrayMap

Android internal NPE in ViewGroup dispatchAttachedToWindow

Does anyone knows how to solve the following bug ?
java.lang.NullPointerException
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2434)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2434)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2434)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2434)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2434)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1313)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1110)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4484)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4856)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
at dalvik.system.NativeStart.main(NativeStart.java)
I got it a few times on Android 4.1 devices when the app is coming back from the background.
You get this only on 4.1v?
Seems that your rootview or your windows is unavailable, we need more coder/log info to get better results.
If so, there isn't a bug, you need to check for your views not null, maybe the GC has quit your view so you get this error.
Please tell us more info, when happens, frequently?, how many time has pass from background?, and so on

Cartotype and Genymotion

I am developing an offline routing app in a team with Cartotype.
We’ve implemented the MapView successfully, and it is working when we test it on a real Android device.
But when i use the Genymotion Emu for testing it, the activity is crashing when called with the following error message in the log cat.
05-25 16:37:19.468: E/AndroidRuntime(1050): FATAL EXCEPTION: main
05-25 16:37:19.468: E/AndroidRuntime(1050): java.lang.ExceptionInInitializerError
05-25 16:37:19.468: E/AndroidRuntime(1050): at de.hshn.tourwest.classes.CMapView.init(CMapView.java:109)
05-25 16:37:19.468: E/AndroidRuntime(1050): at de.hshn.tourwest.classes.CMapView.onDraw(CMapView.java:245)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.draw(View.java:13458)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.getDisplayList(View.java:12409)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.getDisplayList(View.java:12453)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.draw(View.java:13182)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.getDisplayList(View.java:12407)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.getDisplayList(View.java:12453)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.draw(View.java:13182)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.getDisplayList(View.java:12407)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.getDisplayList(View.java:12453)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.draw(View.java:13182)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.draw(View.java:13461)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.widget.FrameLayout.draw(FrameLayout.java:467)
05-25 16:37:19.468: E/AndroidRuntime(1050): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2183)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.getDisplayList(View.java:12409)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.View.getDisplayList(View.java:12453)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1144)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2147)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2019)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1830)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4212)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.Choreographer.doFrame(Choreographer.java:525)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.os.Handler.handleCallback(Handler.java:615)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.os.Handler.dispatchMessage(Handler.java:92)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.os.Looper.loop(Looper.java:137)
05-25 16:37:19.468: E/AndroidRuntime(1050): at android.app.ActivityThread.main(ActivityThread.java:4745)
05-25 16:37:19.468: E/AndroidRuntime(1050): at java.lang.reflect.Method.invokeNative(Native Method)
05-25 16:37:19.468: E/AndroidRuntime(1050): at java.lang.reflect.Method.invoke(Method.java:511)
05-25 16:37:19.468: E/AndroidRuntime(1050): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
05-25 16:37:19.468: E/AndroidRuntime(1050): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
05-25 16:37:19.468: E/AndroidRuntime(1050): at dalvik.system.NativeStart.main(Native Method)
05-25 16:37:19.468: E/AndroidRuntime(1050): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load cartotype: findLibrary returned null
05-25 16:37:19.468: E/AndroidRuntime(1050): at java.lang.Runtime.loadLibrary(Runtime.java:365)
05-25 16:37:19.468: E/AndroidRuntime(1050): at java.lang.System.loadLibrary(System.java:535)
05-25 16:37:19.468: E/AndroidRuntime(1050): at com.cartotype.Framework.<clinit>(Framework.java:944)
05-25 16:37:19.468: E/AndroidRuntime(1050): ... 42 more
i have no android device around me, so that i need to use an emulator.
The libs are correct added:
<project>\libs\cartotype.jar
<project>\libs\armeabi\libcartotype.so
Genymotion runs on x86 architecture.
When the loadLibrary method is executed, the Runtime will try to find the library (.so) inside the folder app_data/libs/x86/
To run your app on this emulator Cartotype needs to support it.
When a library supports x86, the libs directory should look like:
<project>\libs\myLib.jar
<project>\libs\armeabi\myLib.so
<project>\libs\x86\myLib.so
It seems Cartotype does not support x86. So, you should ask to Cartotype to support this architecture as a growing number of devices are using x86 CPUs, including Genymotion.
Or you can try to find another offline maps library that supports x86.
Instead of using Genymotion, use the standard Android emulator in the SDK. Because that emulates an ARM CPU, rather than trying to run x86 code directly, it should cope with your library only being provided in ARM form.
Yes, I know this will be slower, but slower is better than not working at all in this case.

Android: Having force close when accessing the media store

I seems to receive a force close when turning off the phone and turning back on and when I on to the application which require to load the photos with media store , it force close. It has no problem when I wait for awhile before going to the application. Do I need to check anything before using the media store.
The error below may or may not related I don't actually sure.
Log
java.lang.IllegalStateException: couldn't move cursor to position 0
at android.widget.CursorAdapter.getView(CursorAdapter.java:242)
at android.widget.AbsListView.obtainView(AbsListView.java:2472)
at android.widget.GridView.onMeasure(GridView.java:1030)
at android.view.View.measure(View.java:15563)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5112)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1038)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:576)
at android.view.View.measure(View.java:15563)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5112)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:681)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)
at android.view.View.measure(View.java:15563)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5112)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:15563)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5112)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:681)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)
at android.view.View.measure(View.java:15563)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5112)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2411)
at android.view.View.measure(View.java:15563)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2003)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1242)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1417)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1135)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4652)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)

Exception with Android WebView

I have this exception:
java.lang.NullPointerException
at android.webkit.WebViewClassic.requestFocus(WebViewClassic.java:10003)
at android.webkit.WebView.requestFocus(WebView.java:2133)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:2382)
at android.view.ViewGroup.requestFocus(ViewGroup.java:2338)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:2382)
at android.view.ViewGroup.requestFocus(ViewGroup.java:2338)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:2382)
at android.view.ViewGroup.requestFocus(ViewGroup.java:2341)
at android.view.View.requestFocus(View.java:6538)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1899)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1110)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4472)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4918)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
at dalvik.system.NativeStart.main(Native Method)
But it doesn't tell me what line it happened on or anything else. Any idea how to debug this?
Thanks,
Alex

Categories

Resources