Skip to main content
título editado
Enlace
Einer
  • 20.6k
  • 2
  • 17
  • 39

La app se detiene Error IllegalStateException utilizando MediaPlayer - Android

la La app se detiene ;-;

Estoy desarrollando una app, funciona, le doy al list view la radio que quiero, empieza a reproducir, pero si intento cambiar de radio falla, alguna.

¿alguna solución?... perdonad la calidad del código soy nuevo en esto...

AquiAquí el LogCat:

la app se detiene ;-;

Estoy desarrollando una app, funciona, le doy al list view la radio que quiero, empieza a reproducir, pero si intento cambiar de radio falla, alguna solución?... perdonad la calidad del código soy nuevo en esto...

Aqui el LogCat:

La app se detiene

Estoy desarrollando una app, funciona, le doy al list view la radio que quiero, empieza a reproducir, pero si intento cambiar de radio falla.

¿alguna solución?

Aquí el LogCat:

esoty desarollandoEstoy desarrollando una app, funciona, le doy al list view la radio que quiero, empieza a reproducir, pero si inetnointento cambiar de radio falla, alguna solucionsolución?... perdonad la calidad del codigocódigo soy nuevo en esto...

10-03 11:56:32.895 1410-1410/com.david.animefm2 D/ViewRootImpl@e6a08af[MainActivity]: ViewPostImeInputStage processPointer 0 10-03 11:56:32.979 1410-1410/com.david.animefm2 D/ViewRootImpl@e6a08af[MainActivity]: ViewPostImeInputStage processPointer 1 10-03 11:56:32.980 1410-1410/com.david.animefm2 D/AbsListView: onTouchUp() mTouchMode : 0

                                                           --------- beginning of system

10-03 11:56:33.056 1410-1410/com.david.animefm2 V/MediaPlayer-JNI: stop 10-03 11:56:33.056 1410-1410/com.david.animefm2 V/MediaPlayer: stop 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: message received msg=8, ext1=0, ext2=0 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: unrecognized message: (8, 0, 0) 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: callback application 10-03 11:56:33.057 1410-1630/com.david.animefm2 V/MediaPlayer: back from callback 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer-JNI: release 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer: setListener 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer: disconnect 10-03 11:56:33.088 1410-1410/com.david.animefm2 V/MediaPlayer: destructor 10-03 11:56:33.089 1410-1410/com.david.animefm2 V/MediaPlayer: disconnect 10-03 11:56:33.107 1410-1410/com.david.animefm2 D/AndroidRuntime: Shutting down VM

                                                              --------- beginning of crash

10-03 11:56:33.115 1410-1410/com.david.animefm2 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.david.animefm2, PID: 1410 java.lang.IllegalStateException at android.media.MediaPlayer.nativeSetDataSource(Native Method) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1173) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1129) at com.david.animefm2.MainActivity.BotonReproducir(MainActivity.java:102) at com.david.animefm2.MainActivity.SetUrl(MainActivity.java:95) at com.david.animefm2.MainActivity.access$100(MainActivity.java:18) at com.david.animefm2.MainActivity$2.onItemClick(MainActivity.java:57) at android.widget.AdapterView.performItemClick(AdapterView.java:339) at android.widget.AbsListView.performItemClick(AbsListView.java:1718) at android.widget.AbsListView$PerformClick.run(AbsListView.java:4184) at android.widget.AbsListView$13.run(AbsListView.java:6754) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

10-03 11:56:32.895 1410-1410/com.david.animefm2 D/ViewRootImpl@e6a08af[MainActivity]: ViewPostImeInputStage processPointer 0 10-03 11:56:32.979 1410-1410/com.david.animefm2 D/ViewRootImpl@e6a08af[MainActivity]: ViewPostImeInputStage processPointer 1 10-03 11:56:32.980 1410-1410/com.david.animefm2 D/AbsListView: onTouchUp() mTouchMode : 0

--------- beginning of system 10-03 11:56:33.056 1410-1410/com.david.animefm2 V/MediaPlayer-JNI: stop 10-03 11:56:33.056 1410-1410/com.david.animefm2 V/MediaPlayer: stop 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: message received msg=8, ext1=0, ext2=0 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: unrecognized message: (8, 0, 0) 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: callback application 10-03 11:56:33.057 1410-1630/com.david.animefm2 V/MediaPlayer: back from callback 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer-JNI: release 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer: setListener 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer: disconnect 10-03 11:56:33.088 1410-1410/com.david.animefm2 V/MediaPlayer: destructor 10-03 11:56:33.089 1410-1410/com.david.animefm2 V/MediaPlayer: disconnect 10-03 11:56:33.107 1410-1410/com.david.animefm2 D/AndroidRuntime: Shutting down VM

--------- beginning of crash 10-03 11:56:33.115 1410-1410/com.david.animefm2 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.david.animefm2, PID: 1410 java.lang.IllegalStateException at android.media.MediaPlayer.nativeSetDataSource(Native Method) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1173) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1129) at com.david.animefm2.MainActivity.BotonReproducir(MainActivity.java:102) at com.david.animefm2.MainActivity.SetUrl(MainActivity.java:95) at com.david.animefm2.MainActivity.access$100(MainActivity.java:18) at com.david.animefm2.MainActivity$2.onItemClick(MainActivity.java:57) at android.widget.AdapterView.performItemClick(AdapterView.java:339) at android.widget.AbsListView.performItemClick(AbsListView.java:1718) at android.widget.AbsListView$PerformClick.run(AbsListView.java:4184) at android.widget.AbsListView$13.run(AbsListView.java:6754) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

esoty desarollando una app, funciona, le doy al list view la radio que quiero, empieza a reproducir, pero si inetno cambiar de radio falla, alguna solucion?... perdonad la calidad del codigo soy nuevo en esto...

10-03 11:56:32.895 1410-1410/com.david.animefm2 D/ViewRootImpl@e6a08af[MainActivity]: ViewPostImeInputStage processPointer 0 10-03 11:56:32.979 1410-1410/com.david.animefm2 D/ViewRootImpl@e6a08af[MainActivity]: ViewPostImeInputStage processPointer 1 10-03 11:56:32.980 1410-1410/com.david.animefm2 D/AbsListView: onTouchUp() mTouchMode : 0

                                                           --------- beginning of system

10-03 11:56:33.056 1410-1410/com.david.animefm2 V/MediaPlayer-JNI: stop 10-03 11:56:33.056 1410-1410/com.david.animefm2 V/MediaPlayer: stop 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: message received msg=8, ext1=0, ext2=0 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: unrecognized message: (8, 0, 0) 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: callback application 10-03 11:56:33.057 1410-1630/com.david.animefm2 V/MediaPlayer: back from callback 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer-JNI: release 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer: setListener 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer: disconnect 10-03 11:56:33.088 1410-1410/com.david.animefm2 V/MediaPlayer: destructor 10-03 11:56:33.089 1410-1410/com.david.animefm2 V/MediaPlayer: disconnect 10-03 11:56:33.107 1410-1410/com.david.animefm2 D/AndroidRuntime: Shutting down VM

                                                              --------- beginning of crash

10-03 11:56:33.115 1410-1410/com.david.animefm2 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.david.animefm2, PID: 1410 java.lang.IllegalStateException at android.media.MediaPlayer.nativeSetDataSource(Native Method) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1173) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1129) at com.david.animefm2.MainActivity.BotonReproducir(MainActivity.java:102) at com.david.animefm2.MainActivity.SetUrl(MainActivity.java:95) at com.david.animefm2.MainActivity.access$100(MainActivity.java:18) at com.david.animefm2.MainActivity$2.onItemClick(MainActivity.java:57) at android.widget.AdapterView.performItemClick(AdapterView.java:339) at android.widget.AbsListView.performItemClick(AbsListView.java:1718) at android.widget.AbsListView$PerformClick.run(AbsListView.java:4184) at android.widget.AbsListView$13.run(AbsListView.java:6754) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

Estoy desarrollando una app, funciona, le doy al list view la radio que quiero, empieza a reproducir, pero si intento cambiar de radio falla, alguna solución?... perdonad la calidad del código soy nuevo en esto...

10-03 11:56:32.895 1410-1410/com.david.animefm2 D/ViewRootImpl@e6a08af[MainActivity]: ViewPostImeInputStage processPointer 0 10-03 11:56:32.979 1410-1410/com.david.animefm2 D/ViewRootImpl@e6a08af[MainActivity]: ViewPostImeInputStage processPointer 1 10-03 11:56:32.980 1410-1410/com.david.animefm2 D/AbsListView: onTouchUp() mTouchMode : 0

--------- beginning of system 10-03 11:56:33.056 1410-1410/com.david.animefm2 V/MediaPlayer-JNI: stop 10-03 11:56:33.056 1410-1410/com.david.animefm2 V/MediaPlayer: stop 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: message received msg=8, ext1=0, ext2=0 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: unrecognized message: (8, 0, 0) 10-03 11:56:33.056 1410-1630/com.david.animefm2 V/MediaPlayer: callback application 10-03 11:56:33.057 1410-1630/com.david.animefm2 V/MediaPlayer: back from callback 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer-JNI: release 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer: setListener 10-03 11:56:33.058 1410-1410/com.david.animefm2 V/MediaPlayer: disconnect 10-03 11:56:33.088 1410-1410/com.david.animefm2 V/MediaPlayer: destructor 10-03 11:56:33.089 1410-1410/com.david.animefm2 V/MediaPlayer: disconnect 10-03 11:56:33.107 1410-1410/com.david.animefm2 D/AndroidRuntime: Shutting down VM

--------- beginning of crash 10-03 11:56:33.115 1410-1410/com.david.animefm2 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.david.animefm2, PID: 1410 java.lang.IllegalStateException at android.media.MediaPlayer.nativeSetDataSource(Native Method) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1173) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1129) at com.david.animefm2.MainActivity.BotonReproducir(MainActivity.java:102) at com.david.animefm2.MainActivity.SetUrl(MainActivity.java:95) at com.david.animefm2.MainActivity.access$100(MainActivity.java:18) at com.david.animefm2.MainActivity$2.onItemClick(MainActivity.java:57) at android.widget.AdapterView.performItemClick(AdapterView.java:339) at android.widget.AbsListView.performItemClick(AbsListView.java:1718) at android.widget.AbsListView$PerformClick.run(AbsListView.java:4184) at android.widget.AbsListView$13.run(AbsListView.java:6754) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

Origen Enlace
Loading