Problem Description:
Click the play button to display:
e/mediaplayer: error (1, – 2147483648)
e/mediaplayer: error (1, – 2147483648)
Cause analysis:
Although the package service is created and the package name is displayed as follows:
an error will occur if the code is written as follows:
mediaPlayer.setDataSource(context,Uri.parse("android.resource://com.example.homework07.service/" + musics[musicIndex]));
Solution:
Delete the. Service in the code as follows
mediaPlayer.setDataSource(context,Uri.parse("android.resource://com.example.homework07/" + musics[musicIndex]));
Read More:
- Win10 Right-Click desktop to Display Setting Error [How to Solve]
- Google Play googleapi: Error 403: Google Play Android Developer API has not been used in project
- [Solved] Android mediaplayer.prepare() Error: Caused by: java.lang.IllegalStateException
- Avpro Video Error: MediaPlayer.FileLocation [How to Solve]
- android mediaplayer went away with unhandled event after the recording stopped
- [Solved] error“:“element click intercepted“,“message“:“element click intercepted“
- QSP License error: Submit failed! Message: ERROR -Locator 304511e2e493 is already associated to another license
- Wechat Applet error: [app.json file content error] app json: [“usingComponents“][“van-button“]: “@vant/weapp/lib/button/index
- Clickhouse error: XXXX.XXXX_local20211009 (8fdb18e9-bb4c-42d8-8fdb-18e9bb4c02d8): auto…
- [Solved] Error:E0415 no suitable constructor exists to convert from “int“ to “Rational“
- Error starting ApplicationContext. To display the auto-configuration report re-run your application
- Redis cannot double-click redis-server.exe to start normally
- Nacos Click service offline error: caused: errCode: 500, errmsg: do metadata operation failed;
- Solve the problem of incorrect display of dialogfragment width
- [Solved] qt phonon Play wav file Error:“symbol lookup error: /usr/lib/kde4/plugins/phonon_backend/phonon_gstreamer.so: undefined symbol: _ZNK6Phonon11MediaSource3mrlEv”
- [Solved] Markdown Edit Formula Error: ParseError: KaTeX parse error: {align} can be used only in display mode
- [Solved] Open3d error: unable to display image using open3d
- tar: Error opening archive: Failed to open ‘/Users/xxx/Library/Caches/Homebrew/downloads/348a16e
- The tree component in easyUI does not display data or displays undefined solutions
- After SpringBoot starts, exit the console directly and display Process finished with exit code 1