How to solve MediaPlayer error (100, 0) in nexus 5? - android

I am getting the following error in nexus 5 when I play the video for 5-10 minutes.This error is not occurring always.It is working in nexus 9 and samsung duos.
10-08 09:03:14.033 14588-14599 W/AudioSystem﹕ AudioFlinger server died!
10-08 09:03:14.033 14588-14778 W/IMediaDeathNotifier﹕ media server died
10-08 09:03:14.043 14588-14778 E/MediaPlayer﹕ error (100, 0)
10-08 09:03:14.043 14588-14588 D/AndroidRuntime﹕ Shutting down VM
10-08 09:03:14.043 14588-14588 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41849ba8)
10-08 09:03:14.043 14588-14588 E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: , PID: 14588
java.lang.RuntimeException: failure code: -32
at android.media.MediaPlayer.invoke(MediaPlayer.java:664)
at android.media.MediaPlayer.getInbandTrackInfo(MediaPlayer.java:1692)
at android.media.MediaPlayer.scanInternalSubtitleTracks(MediaPlayer.java:1851)
at android.media.MediaPlayer.access$600(MediaPlayer.java:529)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:2198)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
It is working in nexus 5 emulator also.What might be the problem?and how to solve it?

Main reasons is memory issues, second could be mutlithread access on MediaPlayer. Do you have the code so we can elaborate more?

Related

Why Kotlin Android APP gets java.lang.VerifyError KotlinNamesAnnotationIntrospector on KitKat

I'm using Android Studio 3.2.1 on Ubuntu 16.04 with Kotlin plug-in 1.3.11. If I deploy my app with Android Studio to a virtual device with KitKat (API 19), the app is started but immediately crashes. The OS says "Unfortunately, has stopped. I see in the debugger console the following exception:
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x9ccbbb20)
E/AndroidRuntime: FATAL EXCEPTION: main
Process: info.diethealth.app, PID: 2583
java.lang.VerifyError: com/fasterxml/jackson/module/kotlin/KotlinNamesAnnotationIntrospector
at com.fasterxml.jackson.module.kotlin.KotlinModule.setupModule(KotlinModule.kt:40)
at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:722)
at com.fasterxml.jackson.module.kotlin.ExtensionsKt.registerKotlinModule(Extensions.kt:15)
at info.diethealth.app.business.dagger.DietHealthApiModule.provideObjectMapper(DietHealthApiModule.kt:20)
at info.diethealth.app.business.dagger.DietHealthApiModule_ProvideObjectMapperFactory.get(DietHealthApiModule_ProvideObjectMapperFactory.java:23)
at info.diethealth.app.business.dagger.DietHealthApiModule_ProvideObjectMapperFactory.get(DietHealthApiModule_ProvideObjectMapperFactory.java:8)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at info.diethealth.app.business.dagger.DietHealthApiModule_ProvidesRetrofitFactory.get(DietHealthApiModule_ProvidesRetrofitFactory.java:37)
at info.diethealth.app.business.dagger.DietHealthApiModule_ProvidesRetrofitFactory.get(DietHealthApiModule_ProvidesRetrofitFactory.java:11)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at info.diethealth.app.business.dagger.DietHealthApiModule_ProvidesDietHealthApiFactory.get(DietHealthApiModule_ProvidesDietHealthApiFactory.java:31)
at info.diethealth.app.business.dagger.DietHealthApiModule_ProvidesDietHealthApiFactory.get(DietHealthApiModule_ProvidesDietHealthApiFactory.java:10)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at info.diethealth.app.business.dagger.DietHealthServicesModule_ProvidesRecipeDescriptionServiceFactory.get(DietHealthServicesModule_ProvidesRecipeDescriptionServiceFactory.java:69)
at info.diethealth.app.business.dagger.DietHealthServicesModule_ProvidesRecipeDescriptionServiceFactory.get(DietHealthServicesModule_ProvidesRecipeDescriptionServiceFactory.java:16)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at info.diethealth.app.components.main.MainActivity_MembersInjector.injectMembers(MainActivity_MembersInjector.java:31)
at info.diethealth.app.components.main.MainActivity_MembersInjector.injectMembers(MainActivity_MembersInjector.java:8)
at info.diethealth.app.business.dagger.DaggerDietHealthComponent.inject(DaggerDietHealthComponent.java:242)
at info.diethealth.app.components.main.MainActivity.onCreate(MainActivity.kt:50)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
There is no problem with Lollipop (5.0, 5.1) or Marshmallow (6.0).

Getting the crash in this library "com.crashlytics.sdk.android:crashlytics:2.6.5#aar" library in android studio gradle

I have added the above crashlytics library in the AndroidStudio project, but its getting the below error
FATAL EXCEPTION: main
Process: com.pw.health.live_patient, PID: 28520
java.lang.NoClassDefFoundError: com.po.dm.input.DeviceType
at com.po.sdk.NWFactory.initDeviceInfo(NWFactory.java:293)
at com.po.sdk.NWFactory.access$500(NWFactory.java:79)
at com.po.sdk.NWFactory$2.receiveResponseData(NWFactory.java:267)
at com.po.sdk.http.handler.impl.RequestExecutor.onPostExecute(RequestExecutor.java:128)
at com.po.sdk.http.handler.impl.RequestExecutor.onPostExecute(RequestExecutor.java:29)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5086)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
12-16 12:37:25.478 28520-28555/com.pw.health.live_patient I/CrashlyticsCore: Crashlytics report upload complete: 5856754392F0-0001-6F68-9E8808E56C06
Refer This it is working fine for me
https://fabric.io/kits/android/crashlytics/install

java.lang.IncompatibleClassChangeError crash with android 4.4.2 emulator and ART runtime

I am getting a mysterious crash with the 4.4.2 emulator running in ART mode. The app works fine with android 5, and 4.4.2/Dalvik. Any help will be appreciated.
04-17 08:25:24.126 16404-16404/com.my.package.name E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.my.package.name, PID: 16404
java.lang.IncompatibleClassChangeError: Class 'java.lang.reflect.ArtMethod' does not implement interface 'java.lang.Runnable' in call to 'void java.lang.Runnable.run()' (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
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:5017)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)

Exception: Unable to communicate with RAS

I get this exception while tinkering with Google Play Game Services - real time multiplayer. I was trying to create a room for automatch and this happen. This is strange because I have successfully created a multiplayer room many times before. I don't know what it is and how to avoid this?
07-30 14:48:06.103 1063-1063/com.google.android.gms E/RoomServiceClientStateMachine﹕ Unable to communicate with RAS
android.os.RemoteException: Service disconnected
at ffz.onServiceDisconnected(SourceFile:79)
at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1115)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1129)
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:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
07-30 14:48:06.103 636-660/system_process W/DropBoxManagerService﹕ Dropping: SYSTEM_TOMBSTONE (1161 > 0 bytes)
07-30 14:48:06.113 1063-1063/com.google.android.gms I/RoomServiceClientStateMachine﹕ Unable to kill RAS (may already be dead)
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at ecm.a(SourceFile:388)
at ffv.b(SourceFile:111)
at ffz.onServiceDisconnected(SourceFile:79)
at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1115)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1129)
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:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
07-30 14:48:06.113 636-965/system_process I/ActivityManager﹕ Process com.google.android.gms.room (pid 12294) has died.
07-30 14:48:06.143 180-180/? D/Zygote﹕ Process 12294 terminated by signal (11)

Having issues integrating Scandit SDK into my app

Decided to use Scandit SDK to get the barcode scanning feature in my app. Unfortunately, since I'm relatively new to Android development and Java in general I've run into a few issues that I can't seem to work out. The demo that Scandit provided doesn't give any errors(runs fine) but crashes when I try to start it up (pressing a button from one activity is meant to start it up). I've tried reading the logcat and googling a solution to the problems but I'm not getting the right solutions. Does anyone have an idea of what I'm doing wrong?
Logcat is provided below:
10-08 23:30:00.807 21563-21563/com.kwesimbia.management D/AndroidRuntime? Shutting down VM
10-08 23:30:00.807 21563-21563/com.kwesimbia.management W/dalvikvm? threadid=1: thread exiting with uncaught exception (group=0x40aa4228)
10-08 23:30:00.817 21563-21563/com.kwesimbia.management E/AndroidRuntime? FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3082)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3077)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com.kwesimbia.management.ScanditSDKDemoSimple
at com.kwesimbia.management.Activity_D.initiateCodeScan(Activity_D.java:63)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3077)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger? App crashed!
Process: com.kwesimbia.management
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger? App crashed!
Package: com.kwesimbia.management v1 (1.0)
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger?
Application Label: firstapp
10-08 23:30:00.827 32726-587/? W/ActivityManager?
Force finishing activity com.kwesimbia.management/.Activity_D
I came across this problem as well, my solution was to extract the library files and put them as their files in the lib folder
The library basically isn't being exported with it
EDIT
So I checked out my project, basically I did these things:
In the libs folder I have a new folder called armeabi and inside that I have libscanditsdk-android-3.3.1.so
Then in my build path I have also referenced the jar file that they provide:
<classpathentry exported="true" kind="lib" path="C:/GIT/Android/FwayScannerProject/FwayScanner/libs/scanditsdk-barcodepicker-android-3.3.1.jar"/>

Categories

Resources