Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am getting this error when my app crashes due to Sliding Menu Library
12-31 14:02:54.319: E/AndroidRuntime(4121): java.lang.ClassCastException: android.view.ViewGroup$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.ListView.setupChild(ListView.java:1826)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.ListView.makeAndAddView(ListView.java:1793)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.ListView.fillSpecific(ListView.java:1337)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.ListView.layoutChildren(ListView.java:1620)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.AbsListView.onLayout(AbsListView.java:2087)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.View.layout(View.java:14817)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewGroup.layout(ViewGroup.java:4631)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.View.layout(View.java:14817)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewGroup.layout(ViewGroup.java:4631)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.View.layout(View.java:14817)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewGroup.layout(ViewGroup.java:4631)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.View.layout(View.java:14817)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewGroup.layout(ViewGroup.java:4631)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.View.layout(View.java:14817)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewGroup.layout(ViewGroup.java:4631)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.View.layout(View.java:14817)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewGroup.layout(ViewGroup.java:4631)
12-31 14:02:54.319: E/AndroidRuntime(4121): at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.onLayout(CustomViewAbove.java:476)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.View.layout(View.java:14817)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewGroup.layout(ViewGroup.java:4631)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.View.layout(View.java:14817)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewGroup.layout(ViewGroup.java:4631)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.View.layout(View.java:14817)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewGroup.layout(ViewGroup.java:4631)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1983)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1740)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:996)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5600)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.Choreographer.doCallbacks(Choreographer.java:574)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.Choreographer.doFrame(Choreographer.java:544)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.os.Handler.handleCallback(Handler.java:733)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.os.Handler.dispatchMessage(Handler.java:95)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.os.Looper.loop(Looper.java:136)
12-31 14:02:54.319: E/AndroidRuntime(4121): at android.app.ActivityThread.main(ActivityThread.java:5001)
12-31 14:02:54.319: E/AndroidRuntime(4121): at java.lang.reflect.Method.invokeNative(Native Method)
12-31 14:02:54.319: E/AndroidRuntime(4121): at java.lang.reflect.Method.invoke(Method.java:515)
12-31 14:02:54.319: E/AndroidRuntime(4121): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
12-31 14:02:54.319: E/AndroidRuntime(4121): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
12-31 14:02:54.319: E/AndroidRuntime(4121): at dalvik.system.NativeStart.main(Native Method)
can anyone help me in this issue. i tried to download fresh copy of library and use, but even then it is not solved. im compiling all my project dependent projects and app with android 5.0
Check/Organise your imports(ctrl + shift + o, in Eclipse) in CustomViewAbove.java and ensure that if LayoutParams have been used anywhere, they are from the package of android.widget.AbsListView.
Basically that is what your error is telling you:
12-31 14:02:54.319: E/AndroidRuntime(4121): java.lang.ClassCastException:
android.view.ViewGroup$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams
If LayoutParams are being used at multiple places(other than line no. 476), then need to import both packages accordingly.
Related
I am receiving multiples crash reports about the same error, but I have no idea what is may causing it.
The exception that is throwing is ArrayIndexOutOfBoundsException in android.widget.TextView.makeSingleLayout.
I know it is not about Android versions and devices types, since it is getting reports from multiple versions and devices.
Here is what I am getting from Crashlytics:
Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=125; index=-1
at android.text.StaticLayout.calculateEllipsis(StaticLayout.java:785)
at android.text.StaticLayout.out(StaticLayout.java:704)
at android.text.StaticLayout.generate(StaticLayout.java:410)
at android.text.StaticLayout.<init>(StaticLayout.java:140)
at android.widget.TextView.makeSingleLayout(TextView.java:6199)
at android.widget.TextView.makeNewLayout(TextView.java:6056)
at android.widget.TextView.onMeasure(TextView.java:6432)
at android.view.View.measure(View.java:16653)
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1231)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:590)
at android.view.View.measure(View.java:16653)
at android.widget.ListView.setupChild(ListView.java:1870)
at android.widget.ListView.makeAndAddView(ListView.java:1793)
at android.widget.ListView.fillDown(ListView.java:691)
at android.widget.ListView.fillFromTop(ListView.java:752)
at android.widget.ListView.layoutChildren(ListView.java:1616)
at android.widget.AbsListView.onLayout(AbsListView.java:2087)
at android.view.View.layout(View.java:14973)
at android.view.ViewGroup.layout(ViewGroup.java:4637)
at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:636)
at android.view.View.layout(View.java:14973)
at android.view.ViewGroup.layout(ViewGroup.java:4637)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
at android.view.View.layout(View.java:14973)
at android.view.ViewGroup.layout(ViewGroup.java:4637)
at android.support.design.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1167)
at android.support.design.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:852)
at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:871)
at android.view.View.layout(View.java:14973)
at android.view.ViewGroup.layout(ViewGroup.java:4637)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14973)
at android.view.ViewGroup.layout(ViewGroup.java:4637)
at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:437)
at android.view.View.layout(View.java:14973)
at android.view.ViewGroup.layout(ViewGroup.java:4637)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14973)
at android.view.ViewGroup.layout(ViewGroup.java:4637)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
at android.view.View.layout(View.java:14973)
at android.view.ViewGroup.layout(ViewGroup.java:4637)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14973)
at android.view.ViewGroup.layout(ViewGroup.java:4637)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1995)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1752)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1008)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5717)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:544)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5127)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
at dalvik.system.NativeStart.main(NativeStart.java)
Is there any solution for that?
I do not write a explicit implementation for TextView.makeSingleLayout.
It has been almost a year, so my memory on this is a little fuzzy, but...
I faced what I suspect is the same problem in my own app. For me, it was happening because I was using android:ellipsize="start" without also using android:singleLine="true".
We had switched all of our android:singleLine="true" attributes to the recommended android:maxLines="1", but it turns out that there's a bug in how the system calculates the ellipsis that is triggered if singleLine isn't present.
So I believe you can solve this issue by simply adding android:singleLine="true" to your TextViews that are using ellipsize attrs.
This question already has answers here:
What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it?
(26 answers)
Closed 5 years ago.
Error:
03-28 14:23:08.466 8743-8743/com.furbonics.furbonicsexecutive
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.furbonics.furbonicsexecutive, PID: 8743
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at
java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at android.widget.ArrayAdapter.getItem(ArrayAdapter.java:337)
at
android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:390)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)
at android.widget.Spinner.makeView(Spinner.java:592)
at android.widget.Spinner.layout(Spinner.java:540)
at android.widget.Spinner.onLayout(Spinner.java:502)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
at
android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1660)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1436)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.widget.ScrollView.onLayout(ScrollView.java:1468)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14845)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2026)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1783)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1039)
at
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5648)
at
android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:544)
at
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
at android.os.Handler.handleCallback(Handler.java:733)
at android.o
You are trying to read a value from an empty array
lang.IndexOutOfBoundsException: Invalid index 0, size is 0.
Verify that the array is not empty before accessing a value in your code.
It means you are not able to fetch data. First use log and check if output is shown if no then check your code also surround your code for fetching with try and catch.
I'm trying to reuse the RowsFragment provided by AndroidTV Leanback outside of a BrowseFragment, to have a similar row interaction look & feel on a different layout, but I'm getting XML-inflation errors that I haven't been able to debug and solve.
The implementation itself is similar to what is implemented here: https://medium.com/building-for-android-tv , but in the blog he's replacing different fragments of the same kind inside a BrowseFragment. Is there something fundamentally wrong with my approach? If so, why? I've been reading through the Leanback sources and haven't been able to find anything that I would understand (although it's a large library) that would couple the fragments to that degree.
A reproduction of the relevant code:
https://gist.github.com/orbitbot/c9070ed00961c3abe4ca
02-26 12:12:26.950 4465-4527/com.my.client E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.my.client, PID: 4465
android.view.InflateException: Binary XML file line #18: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:462)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v17.leanback.widget.RowContainerView.<init>(RowContainerView.java:48)
at android.support.v17.leanback.widget.RowContainerView.<init>(RowContainerView.java:37)
at android.support.v17.leanback.widget.RowPresenter.onCreateViewHolder(RowPresenter.java:169)
at android.support.v17.leanback.widget.ItemBridgeAdapter.onCreateViewHolder(ItemBridgeAdapter.java:247)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:4121)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3431)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3340)
at android.support.v17.leanback.widget.GridLayoutManager.getViewForPosition(GridLayoutManager.java:573)
at android.support.v17.leanback.widget.GridLayoutManager$2.createItem(GridLayoutManager.java:1057)
at android.support.v17.leanback.widget.StaggeredGrid.appendItemToRow(StaggeredGrid.java:242)
at android.support.v17.leanback.widget.StaggeredGridDefault.appendItems(StaggeredGridDefault.java:49)
at android.support.v17.leanback.widget.GridLayoutManager.appendOneVisibleItem(GridLayoutManager.java:1263)
at android.support.v17.leanback.widget.GridLayoutManager.appendVisibleItems(GridLayoutManager.java:1273)
at android.support.v17.leanback.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:1554)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:1988)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:2237)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.support.v17.leanback.widget.ScaleFrameLayout.onLayout(ScaleFrameLayout.java:135)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14817)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1989)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1746)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5672)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:772
Make sure that your ChangePicActivity has proper theme in AndroidManifest.xml
Add android:theme="#style/Theme.Leanback" to relevant activity tag.
Like this
<activity
android:name=".ChangePicActivity"
android:theme="#style/Theme.Leanback"
>
[...]
i finished my App and started testing it on other devices. My own Device is a HTC One M7 and its working fine. Then i tested it on a Samsung Galaxy S4, the first 2 Layouts are shown but when i start the GameActivity it crashes. Same on an emulated Nexus 7.
But on a ldpi Emulator it works fine.
This is the error i get on the Nexus 7.
12-31 11:27:55.755: E/AndroidRuntime(1514): FATAL EXCEPTION: main
12-31 11:27:55.755: E/AndroidRuntime(1514): Process: com.example.test, PID: 1514
12-31 11:27:55.755: E/AndroidRuntime(1514): java.lang.OutOfMemoryError
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:587)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:422)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:445)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:475)
12-31 11:27:55.755: E/AndroidRuntime(1514): at com.example.test.GameView.<init>(GameView.java:93)
12-31 11:27:55.755: E/AndroidRuntime(1514): at com.example.test.GameActivity.onResume(GameActivity.java:49)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1192)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.app.Activity.performResume(Activity.java:5310)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2778)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2817)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.app.ActivityThread.access$800(ActivityThread.java:135)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.os.Handler.dispatchMessage(Handler.java:102)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.os.Looper.loop(Looper.java:136)
12-31 11:27:55.755: E/AndroidRuntime(1514): at android.app.ActivityThread.main(ActivityThread.java:5017)
12-31 11:27:55.755: E/AndroidRuntime(1514): at java.lang.reflect.Method.invokeNative(Native Method)
12-31 11:27:55.755: E/AndroidRuntime(1514): at java.lang.reflect.Method.invoke(Method.java:515)
12-31 11:27:55.755: E/AndroidRuntime(1514): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
12-31 11:27:55.755: E/AndroidRuntime(1514): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
12-31 11:27:55.755: E/AndroidRuntime(1514): at dalvik.system.NativeStart.main(Native Method)
Can anyone tell me why it is working on 2 Devices and failing on 2 others?
I'm trying to run chromeview and when I call ChromeView.initialize an UnsatsifiedLinkError exception is thrown.
12-31 16:16:28.050: D/dalvikvm(4910): Late-enabling CheckJNI
12-31 16:16:28.155: I/LibraryLoader(4910): loading: webviewchromium
12-31 16:16:28.155: D/dalvikvm(4910): Trying to load lib /data/app-lib/com.example.chromeviewtest-1/libwebviewchromium.so 0x41c443c0
12-31 16:16:28.155: D/dalvikvm(4910): Added shared lib /data/app-lib/com.example.chromeviewtest-1/libwebviewchromium.so 0x41c443c0
12-31 16:16:28.155: I/LibraryLoader(4910): loaded: webviewchromium
12-31 16:16:28.155: W/dalvikvm(4910): No implementation found for native Lorg/chromium/content/app/LibraryLoader;.nativeLibraryLoaded:([Ljava/lang/String;)I
12-31 16:16:28.155: D/AndroidRuntime(4910): Shutting down VM
12-31 16:16:28.155: W/dalvikvm(4910): threadid=1: thread exiting with uncaught exception (group=0x41995c50)
12-31 16:16:28.160: E/AndroidRuntime(4910): FATAL EXCEPTION: main
12-31 16:16:28.160: E/AndroidRuntime(4910): Process: com.example.chromeviewtest, PID: 4910
12-31 16:16:28.160: E/AndroidRuntime(4910): java.lang.UnsatisfiedLinkError: Native method not found: org.chromium.content.app.LibraryLoader.nativeLibraryLoaded:([Ljava/lang/String;)I
12-31 16:16:28.160: E/AndroidRuntime(4910): at org.chromium.content.app.LibraryLoader.nativeLibraryLoaded(Native Method)
12-31 16:16:28.160: E/AndroidRuntime(4910): at org.chromium.content.app.LibraryLoader.initializeAlreadyLocked(LibraryLoader.java:122)
12-31 16:16:28.160: E/AndroidRuntime(4910): at org.chromium.content.app.LibraryLoader.ensureInitialized(LibraryLoader.java:63)
12-31 16:16:28.160: E/AndroidRuntime(4910): at org.chromium.android_webview.AwBrowserProcess$1.run(AwBrowserProcess.java:50)
12-31 16:16:28.160: E/AndroidRuntime(4910): at org.chromium.base.ThreadUtils.runOnUiThreadBlocking(ThreadUtils.java:28)
12-31 16:16:28.160: E/AndroidRuntime(4910): at org.chromium.android_webview.AwBrowserProcess.start(AwBrowserProcess.java:46)
12-31 16:16:28.160: E/AndroidRuntime(4910): at us.costan.chrome.impl.ChromeInitializer.initialize(ChromeInitializer.java:49)
12-31 16:16:28.160: E/AndroidRuntime(4910): at us.costan.chrome.ChromeView.initialize(ChromeView.java:851)
12-31 16:16:28.160: E/AndroidRuntime(4910): at com.example.chromeviewtest.MyApplication.onCreate(MyApplication.java:10)
12-31 16:16:28.160: E/AndroidRuntime(4910): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
12-31 16:16:28.160: E/AndroidRuntime(4910): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4396)
These are the steps I did:
Add chromeview as an eclipse project
Created a new android app, chromeviewtest
Added chromeview as a library
Copied the pak file to assets/
Added an Application class like in the README
How can I fix this?
The problem was that chromeview doesn't work on Android 4.4.