Android LogCat Error Videos and Images - android

i show on my tablelayout two videos and two images. For the videos i use the VideoView and for the images i use Picasso. All code is writed with Xamarin Android.
After any hours i have this error in logcat, but i don't understand the problem.
Can someone help me ? Sorry for my english.
07-28 13:47:35.090: E/Surface(2313): queueBuffer: error queuing buffer to SurfaceTexture, -19
07-28 13:47:35.090: E/Surface(2313): queueBuffer (handle=0x6a578a80) failed (No such device)
07-28 13:47:35.110: E/ViewRootImpl(2313): Could not unlock surface
07-28 13:47:35.110: E/ViewRootImpl(2313): java.lang.IllegalArgumentException
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.Surface.nativeUnlockCanvasAndPost(Native Method)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.Surface.unlockCanvasAndPost(Surface.java:285)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2584)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2437)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2281)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1892)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1005)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5750)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.Choreographer.doCallbacks(Choreographer.java:574)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.Choreographer.doFrame(Choreographer.java:544)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.os.Handler.handleCallback(Handler.java:733)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.os.Handler.dispatchMessage(Handler.java:95)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.os.Looper.loop(Looper.java:136)
07-28 13:47:35.110: E/ViewRootImpl(2313): at android.app.ActivityThread.main(ActivityThread.java:5017)
07-28 13:47:35.110: E/ViewRootImpl(2313): at java.lang.reflect.Method.invokeNative(Native Method)
07-28 13:47:35.110: E/ViewRootImpl(2313): at java.lang.reflect.Method.invoke(Method.java:515)
07-28 13:47:35.110: E/ViewRootImpl(2313): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
07-28 13:47:35.110: E/ViewRootImpl(2313): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
07-28 13:47:35.110: E/ViewRootImpl(2313): at dalvik.system.NativeStart.main(Native Method)
07-28 13:47:35.130: E/ViewRootImpl(2313): drawSoftware() getRotation() error~~~#!
07-28 13:47:37.220: W/IMediaDeathNotifier(2313): media server died
07-28 13:47:37.220: E/MediaPlayer(2313): error (100, 0)
07-28 13:47:37.220: W/AudioSystem(2313): AudioFlinger server died!
07-28 13:47:37.220: E/MediaPlayer(2313): error (100, 0)
07-28 13:47:37.220: E/MediaPlayer(2313): Error (100,0)
07-28 13:47:37.220: D/VideoView(2313): Error: 100,0
07-28 13:47:37.300: D/AndroidRuntime(2313): Shutting down VM
07-28 13:47:37.300: W/dalvikvm(2313): threadid=1: thread exiting with uncaught exception (group=0x418e22a0)
07-28 13:47:37.330: E/AndroidRuntime(2313): FATAL EXCEPTION: main
07-28 13:47:37.330: E/AndroidRuntime(2313): Process: com.XXX.XXX, PID: 2313
07-28 13:47:37.330: E/AndroidRuntime(2313): java.lang.RuntimeException: Adding window failed
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.view.ViewRootImpl.setView(ViewRootImpl.java:516)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:259)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.app.Dialog.show(Dialog.java:286)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.app.AlertDialog$Builder.show(AlertDialog.java:951)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.widget.VideoView$5.onError(VideoView.java:515)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:2248)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.os.Handler.dispatchMessage(Handler.java:102)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.os.Looper.loop(Looper.java:136)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.app.ActivityThread.main(ActivityThread.java:5017)
07-28 13:47:37.330: E/AndroidRuntime(2313): at java.lang.reflect.Method.invokeNative(Native Method)
07-28 13:47:37.330: E/AndroidRuntime(2313): at java.lang.reflect.Method.invoke(Method.java:515)
07-28 13:47:37.330: E/AndroidRuntime(2313): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
07-28 13:47:37.330: E/AndroidRuntime(2313): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
07-28 13:47:37.330: E/AndroidRuntime(2313): at dalvik.system.NativeStart.main(Native Method)
07-28 13:47:37.330: E/AndroidRuntime(2313): Caused by: android.os.DeadObjectException
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.os.BinderProxy.transact(Native Method)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.view.IWindowSession$Stub$Proxy.addToDisplay(IWindowSession.java:721)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.view.ViewRootImpl.setView(ViewRootImpl.java:505)
07-28 13:47:37.330: E/AndroidRuntime(2313): ... 14 more
07-28 13:47:37.330: I/Process(2313): Sending signal. PID: 2313 SIG: 9
07-28 13:47:37.330: E/AndroidRuntime(2313): Error reporting crash
07-28 13:47:37.330: E/AndroidRuntime(2313): android.os.DeadObjectException
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.os.BinderProxy.transact(Native Method)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:3703)
07-28 13:47:37.330: E/AndroidRuntime(2313): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:84)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.runtime.UncaughtExceptionHandler.n_uncaughtException(Native Method)
07-28 13:47:37.330: E/AndroidRuntime(2313): at android.runtime.UncaughtExceptionHandler.uncaughtException(UncaughtExceptionHandler.java:37)
07-28 13:47:37.330: E/AndroidRuntime(2313): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
07-28 13:47:37.330: E/AndroidRuntime(2313): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
07-28 13:47:37.330: E/AndroidRuntime(2313): at dalvik.system.NativeStart.main(Native Method)

Related

How to reproduce "createWindowSurface failed EGL_BAD_ALLOC" exception on my device?

ava.lang.RuntimeException: createWindowSurface failed EGL_BAD_ALLOC
at android.view.HardwareRenderer$GlRenderer.createSurface(HardwareRenderer.java:1387)
at android.view.HardwareRenderer$GlRenderer.createEglSurface(HardwareRenderer.java:1279)
at android.view.HardwareRenderer$GlRenderer.initialize(HardwareRenderer.java:1096)
at android.view.HardwareRenderer.initializeIfNeeded(HardwareRenderer.java:605)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2596)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2430)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2005)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1076)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5905)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:807)
at android.view.Choreographer.doCallbacks(Choreographer.java:601)
at android.view.Choreographer.doFrame(Choreographer.java:562)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:791)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5633)
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:896)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:712)
at dalvik.system.NativeStart.main(NativeStart.java)
I am not using any OpenGl or anything of that sort. And hardwareAccelaration is also false

Cocos2d-x game built with Android API 21 is not working on lower API versions

I have built cocos2d-x game using Android API 21 but it is not working on lower API version, game crashes on startup. These are the logs:
07-28 22:09:47.358: E/dalvikvm(6483): dlopen("/data/app-lib/com.pld.readingrace1a-1/libcocos2dcpp.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "rand" referenced by "libcocos2dcpp.so"...
07-28 22:09:47.366: E/AndroidRuntime(6483): FATAL EXCEPTION: main
07-28 22:09:47.366: E/AndroidRuntime(6483): java.lang.ExceptionInInitializerError
07-28 22:09:47.366: E/AndroidRuntime(6483): at java.lang.Class.newInstanceImpl(Native Method)
07-28 22:09:47.366: E/AndroidRuntime(6483): at java.lang.Class.newInstance(Class.java:1319)
07-28 22:09:47.366: E/AndroidRuntime(6483): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
07-28 22:09:47.366: E/AndroidRuntime(6483): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
07-28 22:09:47.366: E/AndroidRuntime(6483): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
07-28 22:09:47.366: E/AndroidRuntime(6483): at android.app.ActivityThread.access$600(ActivityThread.java:141)
07-28 22:09:47.366: E/AndroidRuntime(6483): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
07-28 22:09:47.366: E/AndroidRuntime(6483): at android.os.Handler.dispatchMessage(Handler.java:99)
07-28 22:09:47.366: E/AndroidRuntime(6483): at android.os.Looper.loop(Looper.java:137)
07-28 22:09:47.366: E/AndroidRuntime(6483): at android.app.ActivityThread.main(ActivityThread.java:5041)
07-28 22:09:47.366: E/AndroidRuntime(6483): at java.lang.reflect.Method.invokeNative(Native Method)
07-28 22:09:47.366: E/AndroidRuntime(6483): at java.lang.reflect.Method.invoke(Method.java:511)
07-28 22:09:47.366: E/AndroidRuntime(6483): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
07-28 22:09:47.366: E/AndroidRuntime(6483): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
07-28 22:09:47.366: E/AndroidRuntime(6483): at java.lang.Runtime.loadLibrary(Runtime.java:371)
07-28 22:09:47.366: E/AndroidRuntime(6483): at java.lang.System.loadLibrary(System.java:535)
07-28 22:09:47.366: E/AndroidRuntime(6483): at org.cocos2dx.cpp.AppActivity.<clinit>(AppActivity.java:272)
I have searched and found some answers on stack overflow like
this one
but I want to build my game on API 21 because I am using some new features and I want it to work on older API versions. Can someone help in this regard. Thanks.
Make sure you set your TARGET SDK to a lower version. You should still be able to access most of the API 21 features.

Android studio on windows 7 error :UNEXPECTED TOP-LEVEL EXCEPTION

the error occurred when imported the osmand project :
Error:Execution failed for task ':OsmAnd:preDexFreeLegacyArmv5Debug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
E:\Android\sdk\build-tools\21.1.2\dx.bat --dex --force-jumbo --output E:\Android_test_projects\Osmand-master2\Osmand-master\OsmAnd\build\intermediates\pre-dexed\freelegacyarmv5\debug\OsmAnd-java-android-9c283cd307dbfef07359ccbde68a116b21ff0b4f.jar E:\Android_test_projects\Osmand-master2\Osmand-master\OsmAnd-java\build\libs\OsmAnd-java-android.jar
Error Code:
1
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
...while parsing com/google/protobuf/AbstractMessage$1.class
1 error; aborting
the cause of above error was java 1.8. after changing it to 1.7 i got this run time error
2-11 10:28:55.160 26327-26327/net.osmand V/Zygote﹕ Switching descriptor 34 to /dev/null
02-11 10:28:55.160 26327-26327/net.osmand V/Zygote﹕ Switching descriptor 9 to /dev/null
02-11 10:28:55.160 26327-26327/net.osmand D/dalvikvm﹕ Late-enabling CheckJNI
02-11 10:28:55.200 26327-26327/net.osmand D/ActivityThread﹕ handleBindApplication:net.osmand
02-11 10:28:55.200 26327-26327/net.osmand D/ActivityThread﹕ setTargetHeapUtilization:0.75
02-11 10:28:55.200 26327-26327/net.osmand D/ActivityThread﹕ setTargetHeapMinFree:2097152
02-11 10:28:55.260 26327-26327/net.osmand I/net.osmand﹕ ResourceManager Tiles to load in memory : 162.0
02-11 10:28:55.350 26327-26327/net.osmand D/AndroidRuntime﹕ Shutting down VM
02-11 10:28:55.350 26327-26327/net.osmand W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41653db8)
02-11 10:28:55.350 26327-26327/net.osmand E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: net.osmand, PID: 26327
java.lang.RuntimeException: Unable to create application net.osmand.plus.OsmandApplication: java.lang.IllegalStateException: java.lang.IllegalArgumentException: is == null
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4476)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: java.lang.IllegalArgumentException: is == null
at net.osmand.router.RoutingConfiguration.getDefault(RoutingConfiguration.java:171)
at net.osmand.plus.helpers.AvoidSpecificRoads.getBuilder(AvoidSpecificRoads.java:44)
at net.osmand.plus.helpers.AvoidSpecificRoads.<init>(AvoidSpecificRoads.java:38)
at net.osmand.plus.OsmandApplication.onCreate(OsmandApplication.java:165)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4473)
            at android.app.ActivityThread.access$1500(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5146)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: is == null
at org.kxml2.io.KXmlParser.setInput(KXmlParser.java:1625)
at net.osmand.router.RoutingConfiguration.parseFromInputStream(RoutingConfiguration.java:184)
at net.osmand.router.RoutingConfiguration.getDefault(RoutingConfiguration.java:169)
            at net.osmand.plus.helpers.AvoidSpecificRoads.getBuilder(AvoidSpecificRoads.java:44)
            at net.osmand.plus.helpers.AvoidSpecificRoads.<init>(AvoidSpecificRoads.java:38)
            at net.osmand.plus.OsmandApplication.onCreate(OsmandApplication.java:165)
            at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4473)
            at android.app.ActivityThread.access$1500(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5146)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
            at dalvik.system.NativeStart.main(Native Method)
02-11 10:29:42.570 26327-26334/net.osmand D/dalvikvm﹕ null clazz in OP_INSTANCE_OF, single-stepping
02-11 10:33:27.190 26327-26327/net.osmand I/Process﹕ Sending signal. PID: 26327 SIG: 9
02-11 10:34:10.670 26873-26873/net.osmand D/ActivityThread﹕ handleBindApplication:net.osmand
02-11 10:34:10.670 26873-26873/net.osmand D/ActivityThread﹕ setTargetHeapUtilization:0.75
02-11 10:34:10.670 26873-26873/net.osmand D/ActivityThread﹕ setTargetHeapMinFree:2097152
02-11 10:34:10.740 26873-26873/net.osmand I/net.osmand﹕ ResourceManager Tiles to load in memory : 162.0
02-11 10:34:10.840 26873-26873/net.osmand D/AndroidRuntime﹕ Shutting down VM
02-11 10:34:10.840 26873-26873/net.osmand W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41653db8)
02-11 10:34:10.840 26873-26873/net.osmand E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: net.osmand, PID: 26873
java.lang.RuntimeException: Unable to create application net.osmand.plus.OsmandApplication: java.lang.IllegalStateException: java.lang.IllegalArgumentException: is == null
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4476)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: java.lang.IllegalArgumentException: is == null
at net.osmand.router.RoutingConfiguration.getDefault(RoutingConfiguration.java:171)
at net.osmand.plus.helpers.AvoidSpecificRoads.getBuilder(AvoidSpecificRoads.java:44)
at net.osmand.plus.helpers.AvoidSpecificRoads.<init>(AvoidSpecificRoads.java:38)
at net.osmand.plus.OsmandApplication.onCreate(OsmandApplication.java:165)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4473)
            at android.app.ActivityThread.access$1500(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5146)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: is == null
at org.kxml2.io.KXmlParser.setInput(KXmlParser.java:1625)
at net.osmand.router.RoutingConfiguration.parseFromInputStream(RoutingConfiguration.java:184)
at net.osmand.router.RoutingConfiguration.getDefault(RoutingConfiguration.java:169)
            at net.osmand.plus.helpers.AvoidSpecificRoads.getBuilder(AvoidSpecificRoads.java:44)
            at net.osmand.plus.helpers.AvoidSpecificRoads.<init>(AvoidSpecificRoads.java:38)
            at net.osmand.plus.OsmandApplication.onCreate(OsmandApplication.java:165)
            at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4473)
            at android.app.ActivityThread.access$1500(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5146)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
            at dalvik.system.NativeStart.main(Native Method)
02-11 10:34:58.010 26873-26880/net.osmand D/dalvikvm﹕ null clazz in OP_INSTANCE_OF, single-stepping
I`ve got same issue, i moved all the .java class files to the root package and all errors were gone...

Unable to map a ListView with ArrayList

I am using Arraylist with definition
ArrayList<HashMap<String, String>> placesListItems = new ArrayList<HashMap<String,String>>();
Using following code to populate the Arraylist
for (Place p : placelist.getPlaces()) {
HashMap<String, String> map = new HashMap<String, String>();
// Place reference won't display in listview - it will be hidden
// Place reference is used to get "place full details"
map.put(KEY_REFERENCE, p.getReference());
// Place name
map.put(KEY_NAME, p.getName());
// adding HashMap to ArrayList
placesListItems.add(map);
}
and following code to bind it to a listview
ListAdapter adapter = new SimpleAdapter(this, placesListItems,
R.layout.list_item,
new String[] { KEY_REFERENCE, KEY_NAME}, new int[] {
R.id.reference, R.id.name });
lv.setAdapter(adapter);
the problem is, My ListView stays blank and stops unexpectedly after a few moments.
I have checked using debugger that placelistitems was correctly built.
Any help would be highly appreciated.
Thanks!
EDIT:
It is something to do with values recieved but I am not sure what. I am using google Place's JSON response to feed data to this arraylist.
here is my logcat:
07-28 21:18:33.709: W/System.err(8176): org.json.JSONException: No value for rating
07-28 21:18:33.709: W/System.err(8176): at org.json.JSONObject.get(JSONObject.java:354)
07-28 21:18:33.719: W/System.err(8176): at org.json.JSONObject.getDouble(JSONObject.java:409)
07-28 21:18:33.719: W/System.err(8176): at org.gmarz.googleplaces.models.Place.<init>(Place.java:36)
07-28 21:18:33.719: W/System.err(8176): at org.gmarz.googleplaces.models.PlacesResult.<init>(PlacesResult.java:21)
07-28 21:18:33.719: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:94)
07-28 21:18:33.719: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:53)
07-28 21:18:33.729: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:66)
07-28 21:18:33.729: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:71)
07-28 21:18:33.729: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:26)
07-28 21:18:33.729: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:1)
07-28 21:18:33.729: W/System.err(8176): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-28 21:18:33.729: W/System.err(8176): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
07-28 21:18:33.739: W/System.err(8176): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
07-28 21:18:33.739: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
07-28 21:18:33.739: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
07-28 21:18:33.739: W/System.err(8176): at java.lang.Thread.run(Thread.java:1019)
07-28 21:18:33.749: W/System.err(8176): org.json.JSONException: No value for rating
07-28 21:18:33.759: W/System.err(8176): at org.json.JSONObject.get(JSONObject.java:354)
07-28 21:18:33.759: W/System.err(8176): at org.json.JSONObject.getDouble(JSONObject.java:409)
07-28 21:18:33.769: W/System.err(8176): at org.gmarz.googleplaces.models.Place.<init>(Place.java:36)
07-28 21:18:33.769: W/System.err(8176): at org.gmarz.googleplaces.models.PlacesResult.<init>(PlacesResult.java:21)
07-28 21:18:33.769: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:94)
07-28 21:18:33.769: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:53)
07-28 21:18:33.769: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:66)
07-28 21:18:33.769: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:71)
07-28 21:18:33.769: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:26)
07-28 21:18:33.779: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:1)
07-28 21:18:33.779: W/System.err(8176): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-28 21:18:33.779: W/System.err(8176): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
07-28 21:18:33.779: W/System.err(8176): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
07-28 21:18:33.779: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
07-28 21:18:33.789: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
07-28 21:18:33.789: W/System.err(8176): at java.lang.Thread.run(Thread.java:1019)
07-28 21:18:33.819: W/System.err(8176): org.json.JSONException: No value for rating
07-28 21:18:33.859: W/System.err(8176): at org.json.JSONObject.get(JSONObject.java:354)
07-28 21:18:33.989: W/System.err(8176): at org.json.JSONObject.getDouble(JSONObject.java:409)
07-28 21:18:33.989: W/System.err(8176): at org.gmarz.googleplaces.models.Place.<init>(Place.java:36)
07-28 21:18:33.989: W/System.err(8176): at org.gmarz.googleplaces.models.PlacesResult.<init>(PlacesResult.java:21)
07-28 21:18:34.009: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:94)
07-28 21:18:34.019: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:53)
07-28 21:18:34.039: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:66)
07-28 21:18:34.039: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:71)
07-28 21:18:34.039: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:26)
07-28 21:18:34.039: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:1)
07-28 21:18:34.049: W/System.err(8176): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-28 21:18:34.049: W/System.err(8176): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
07-28 21:18:34.049: W/System.err(8176): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
07-28 21:18:34.049: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
07-28 21:18:34.049: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
07-28 21:18:34.049: W/System.err(8176): at java.lang.Thread.run(Thread.java:1019)
07-28 21:18:34.049: W/System.err(8176): org.json.JSONException: No value for rating
07-28 21:18:34.069: W/System.err(8176): at org.json.JSONObject.get(JSONObject.java:354)
07-28 21:18:34.069: W/System.err(8176): at org.json.JSONObject.getDouble(JSONObject.java:409)
07-28 21:18:34.069: W/System.err(8176): at org.gmarz.googleplaces.models.Place.<init>(Place.java:36)
07-28 21:18:34.069: W/System.err(8176): at org.gmarz.googleplaces.models.PlacesResult.<init>(PlacesResult.java:21)
07-28 21:18:34.069: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:94)
07-28 21:18:34.069: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:53)
07-28 21:18:34.069: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:66)
07-28 21:18:34.079: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:71)
07-28 21:18:34.079: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:26)
07-28 21:18:34.079: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:1)
07-28 21:18:34.079: W/System.err(8176): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-28 21:18:34.079: W/System.err(8176): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
07-28 21:18:34.079: W/System.err(8176): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
07-28 21:18:34.079: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
07-28 21:18:34.089: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
07-28 21:18:34.089: W/System.err(8176): at java.lang.Thread.run(Thread.java:1019)
07-28 21:18:34.089: W/System.err(8176): org.json.JSONException: No value for rating
07-28 21:18:34.099: W/System.err(8176): at org.json.JSONObject.get(JSONObject.java:354)
07-28 21:18:34.099: W/System.err(8176): at org.json.JSONObject.getDouble(JSONObject.java:409)
07-28 21:18:34.099: W/System.err(8176): at org.gmarz.googleplaces.models.Place.<init>(Place.java:36)
07-28 21:18:34.099: W/System.err(8176): at org.gmarz.googleplaces.models.PlacesResult.<init>(PlacesResult.java:21)
07-28 21:18:34.099: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:94)
07-28 21:18:34.109: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:53)
07-28 21:18:34.109: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:66)
07-28 21:18:34.109: W/System.err(8176): at org.gmarz.googleplaces.GooglePlaces.getPlaces(GooglePlaces.java:71)
07-28 21:18:34.119: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:26)
07-28 21:18:34.119: W/System.err(8176): at com.example.testlibrary.Async.doInBackground(Async.java:1)
07-28 21:18:34.119: W/System.err(8176): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-28 21:18:34.119: W/System.err(8176): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
07-28 21:18:34.119: W/System.err(8176): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
07-28 21:18:34.119: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
07-28 21:18:34.119: W/System.err(8176): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
07-28 21:18:34.119: W/System.err(8176): at java.lang.Thread.run(Thread.java:1019)
07-28 21:18:34.159: W/dalvikvm(8176): threadid=9: thread exiting with uncaught exception (group=0x40018578)
07-28 21:18:34.329: E/AndroidRuntime(8176): FATAL EXCEPTION: AsyncTask #1
07-28 21:18:34.329: E/AndroidRuntime(8176): java.lang.RuntimeException: An error occured while executing doInBackground()
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.os.AsyncTask$3.done(AsyncTask.java:200)
07-28 21:18:34.329: E/AndroidRuntime(8176): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
07-28 21:18:34.329: E/AndroidRuntime(8176): at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
07-28 21:18:34.329: E/AndroidRuntime(8176): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
07-28 21:18:34.329: E/AndroidRuntime(8176): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
07-28 21:18:34.329: E/AndroidRuntime(8176): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
07-28 21:18:34.329: E/AndroidRuntime(8176): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
07-28 21:18:34.329: E/AndroidRuntime(8176): at java.lang.Thread.run(Thread.java:1019)
07-28 21:18:34.329: E/AndroidRuntime(8176): Caused by: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.view.ViewRoot.checkThread(ViewRoot.java:3020)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.view.ViewRoot.focusableViewAvailable(ViewRoot.java:1718)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:452)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:452)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:452)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:452)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.view.View.setFlags(View.java:4614)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.view.View.setFocusableInTouchMode(View.java:3190)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.widget.AdapterView.checkFocus(AdapterView.java:694)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.widget.ListView.setAdapter(ListView.java:503)
07-28 21:18:34.329: E/AndroidRuntime(8176): at com.example.testlibrary.MainActivity.processFinish(MainActivity.java:66)
07-28 21:18:34.329: E/AndroidRuntime(8176): at com.example.testlibrary.Async.doInBackground(Async.java:28)
07-28 21:18:34.329: E/AndroidRuntime(8176): at com.example.testlibrary.Async.doInBackground(Async.java:1)
07-28 21:18:34.329: E/AndroidRuntime(8176): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-28 21:18:34.329: E/AndroidRuntime(8176): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
07-28 21:18:34.329: E/AndroidRuntime(8176): ... 4 more
Another Edit:
here is my list XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView android:id="#+id/reference"
android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView android:id="#+id/name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10sp"
android:textStyle="bold"
android:textSize="16sp"/>
<ListView
android:id="#+id/lvPlaces"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginRight="26dp" >
</ListView>
</LinearLayout>
ListAdapter adapter = new SimpleAdapter(filename.this, placesListItems,
R.layout.list_item,
new String[] { KEY_REFERENCE, KEY_NAME}, new int[] {
R.id.reference, R.id.name });
// lv.setAdapter(adapter);
setListAdapter(adapter);

java.net.SocketException: Connection reset by peer

07-28 12:41:40.953: W/System.err(3386): java.net.SocketException: Connection reset by peer
07-28 12:41:40.953: W/System.err(3386): at org.apache.harmony.luni.platform.OSNetworkSystem.read(Native Method)
07-28 12:41:40.953: W/System.err(3386): at dalvik.system.BlockGuard$WrappedNetworkSystem.read(BlockGuard.java:273)
07-28 12:41:40.953: W/System.err(3386): at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:458)
07-28 12:41:40.953: W/System.err(3386): at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:85)
07-28 12:41:40.953: W/System.err(3386): at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:166)
07-28 12:41:40.953: W/System.err(3386): at java.io.BufferedInputStream.read(BufferedInputStream.java:225)
07-28 12:41:40.953: W/System.err(3386): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.readLine(HttpURLConnectionImpl.java:660)
07-28 12:41:40.953: W/System.err(3386): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.readResponseHeaders(HttpURLConnectionImpl.java:690)
07-28 12:41:40.953: W/System.err(3386): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.retrieveResponse(HttpURLConnectionImpl.java:1040)
07-28 12:41:40.953: W/System.err(3386): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:512)
07-28 12:41:40.953: W/System.err(3386): at com.android.epaisa.Info.submitInfo(Info.java:168)
07-28 12:41:40.953: W/System.err(3386): at com.android.epaisa.Info.onClick(Info.java:62)
07-28 12:41:40.953: W/System.err(3386): at android.view.View.performClick(View.java:2485)
07-28 12:41:40.953: W/System.err(3386): at android.view.View$PerformClick.run(View.java:9080)
07-28 12:41:40.953: W/System.err(3386): at android.os.Handler.handleCallback(Handler.java:587)
07-28 12:41:40.953: W/System.err(3386): at android.os.Handler.dispatchMessage(Handler.java:92)
07-28 12:41:40.953: W/System.err(3386): at android.os.Looper.loop(Looper.java:130)
07-28 12:41:40.953: W/System.err(3386): at android.app.ActivityThread.main(ActivityThread.java:3687)
07-28 12:41:40.953: W/System.err(3386): at java.lang.reflect.Method.invokeNative(Native Method)
07-28 12:41:40.953: W/System.err(3386): at java.lang.reflect.Method.invoke(Method.java:507)
07-28 12:41:40.953: W/System.err(3386): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
07-28 12:41:40.960: W/System.err(3386): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
07-28 12:41:40.960: W/System.err(3386): at dalvik.system.NativeStart.main(Native Method)
Line where error is occurring is
InputStream is = conn.getInputStream();
The connection is valid stream
Please help me in solving the issue . I am getting this error while trying to access a JSON object. upon manually checking the URL the result is as expected. I am trying to send an jpg image file compressing it converting it into byte array and then sending over the internet.
Thanks and Regards,
Guys the error was occurring because of timeout due to slow response in the internet connection and thus the connection was getting reset as per the coding at the backend.

Categories

Resources