简体   繁体   English

java.io.IOException:准备失败。:状态= 0x1

[英]java.io.IOException: Prepare failed.: status=0x1

i get this when using phonegap`s Media.我在使用 phonegap 的媒体时得到了这个。 the song does not play, instead i get error code 5歌曲无法播放,而是出现错误代码 5

any ideas?有任何想法吗?

05-26 02:35:41.796 1153 8918 V PlayerDriver: HandleInformationalEvent: PVMFInfoErrorHandlingStart
05-26 02:35:41.796 1153 8918 V PlayerDriver: HandleInformationalEvent: type=26 UNHANDLED
05-26 02:35:41.796 8832 8837 W MediaPlayer: info/warning (1, 26)
05-26 02:35:41.796 8832 8832 I MediaPlayer: Info (1,26)
05-26 02:35:41.796 1153 8918 D : enter SharedLibraryLookup
05-26 02:35:41.796 1153 8918 D : enter GetFactoryAndMimeString
05-26 02:35:41.796 1153 8918 V PlayerDriver: CommandCompleted
05-26 02:35:41.796 1153 8918 V PlayerDriver: Completed command (7)PLAYER_PREPARE status=PVMFErrResource
05-26 02:35:41.796 1153 8918 E PlayerDriver: Command PLAYER_PREPARE completed with an error or info PVMFErrResource
05-26 02:35:41.796 8832 8836 E MediaPlayer: error (1, -17)
05-26 02:35:41.803 8832 8917 W System.err: java.io.IOException: Prepare failed.: status=0x1
05-26 02:35:41.803 8832 8917 W System.err: at android.media.MediaPlayer.prepare(Native Method)
05-26 02:35:41.803 8832 8917 W System.err: at com.phonegap.AudioPlayer.startPlaying(AudioPlayer.java:209)
05-26 02:35:41.803 8832 8917 W System.err: at com.phonegap.AudioHandler.startPlayingAudio(AudioHandler.java:181)
05-26 02:35:41.803 8832 8917 W System.err: at com.phonegap.AudioHandler.execute(AudioHandler.java:64)
05-26 02:35:41.803 8832 8917 W System.err: at com.phonegap.api.PluginManager$1.run(PluginManager.java:86)
05-26 02:35:41.803 8832 8917 W System.err: at java.lang.Thread.run(Thread.java:1096)
05-26 02:35:41.803 1153 8918 V PVPlayer: check_for_live_streaming s=-2147483648, cancelled=0
05-26 02:35:41.803 1153 8918 V PlayerDriver: HandleInformationalEvent: PVMFInfoErrorHandlingComplete
05-26 02:35:41.803 1153 8918 W PlayerDriver: PVMFInfoErrorHandlingComplete
05-26 02:35:41.889 8832 8838 D cache : save chahe file for url http://127.0.0.1:43207/83f3430c-970d-4dfc-9aa2-159167b7c894
05-26 02:35:41.905 8832 8838 D cache : mDataBase.getCache() for url http://127.0.0.1:43207/83f3430c-970d-4dfc-9aa2-159167b7c894 len=70
05-26 02:35:42.007 8832 8838 D cache : save chahe file for url http://127.0.0.1:43207/83f3430c-970d-4dfc-9aa2-159167b7c894
05-26 02:35:42.038 1275 1279 D KeyguardViewMediator: setHidden false
05-26 02:35:42.069 1275 1861 D KeyguardViewMediator: setHidden false
05-26 02:35:42.717 1153 8890 V PlayerDriver: HandleInformationalEvent: PVMFInfoPositionStatus

The description of PVMFErrResource is: PVMFErrResource的描述是:

Error due to general error in underlying resource由于基础资源中的一般错误而导致的错误

That's where you have to look: the underlying resource is most likely the file that you want to play.这就是您必须查看的地方:底层资源很可能是您要播放的文件。 Maybe it's not accessible, maybe it's corrupt, maybe the type is not supported.也许它无法访问,也许它已损坏,也许该类型不受支持。

Further Reading延伸阅读

Encountered a similar problem when with the audio file content is having issues with the android.当音频文件内容与 android 有问题时遇到类似的问题。 I am not sure why it happens.我不确定为什么会这样。

I am assuming you are using mp3, try using a.ogg file instead.我假设您使用的是 mp3,请尝试使用 a.ogg 文件。

I have got the same exception and was able to get it working by changing the location.我遇到了同样的异常,并且能够通过更改位置来使其正常工作。 See how-to-play-song-in-android-phonegap for the correct URL.有关正确的 URL,请参阅how-to-play-song-in-android- phonegap。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.io.IOException:准备失败。:Android中的status = 0x1 - java.io.IOException: Prepare failed.: status=0x1 in Android Android MediaPlayer java.io.IOException: Prepare failed.: status=0x1, 无法修复 - Android MediaPlayer java.io.IOException: Prepare failed.: status=0x1, cant fix java.io.IOException:准备失败:状态= 0x1 - java.io.IOException:prepared failed:status=0x1 使用SurfaceView仅在三星GT-I8260中渲染视频时出现问题。 IOException:准备失败。:status = 0x1 - Problems rendering video only in Samnsung GT-I8260 using SurfaceView. IOException: Prepare failed.: status=0x1 无法使用java.io.IOException创建媒体播放器:setDataSourceFD失败:状态= 0x80000000在2.3.3安卓平板电脑 - Unable to to create media player with java.io.IOException: setDataSourceFD failed.: status=0x80000000 in 2.3.3 android tablet Android MediaPlayer return Prepare failed.: status=0x1 on device but running in emulator - Android MediaPlayer return Prepare failed.: status=0x1 on device but runs in emulator java.io.IOException:setdatasource失败状态= 0xFFF - java.io.IOException:setdatasource failed status = 0xFFF java.io.IOException:所有收集器的初始化失败。 最后一个收集器中的错误是:null - java.io.IOException: Initialization of all the collectors failed. Error in last collector was :null 索引器:java.io.IOException:作业失败 - Indexer: java.io.IOException: Job failed java.io.IOException:grpc 失败 - java.io.IOException: grpc failed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM