Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8048065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:18:30+00:00 2026-06-05T06:18:30+00:00

I’m making an android application that plays music. When I run it, I get

  • 0

I’m making an android application that plays music. When I run it, I get a NullPointer exception, and I have no clue why!!

Here is the code in my onCreate() in my activity:

MediaPlayer mp = MediaPlayer.create(this, R.raw.tekno);
    mp.start();

Here is my log cat:

06-03 17:09:51.520: D/MediaPlayer(19255): create failed:
06-03 17:09:51.520: D/MediaPlayer(19255): java.io.IOException: setDataSourceFD failed.: status=0x80000000
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.media.MediaPlayer.setDataSource(Native Method)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.media.MediaPlayer.create(MediaPlayer.java:735)
06-03 17:09:51.520: D/MediaPlayer(19255):   at com.jlennon.gametest.PlayGameActivity.onCreate(PlayGameActivity.java:31)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.app.Activity.performCreate(Activity.java:4465)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.app.ActivityThread.access$600(ActivityThread.java:123)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.os.Handler.dispatchMessage(Handler.java:99)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.os.Looper.loop(Looper.java:137)
06-03 17:09:51.520: D/MediaPlayer(19255):   at android.app.ActivityThread.main(ActivityThread.java:4424)
06-03 17:09:51.520: D/MediaPlayer(19255):   at java.lang.reflect.Method.invokeNative(Native Method)
06-03 17:09:51.520: D/MediaPlayer(19255):   at java.lang.reflect.Method.invoke(Method.java:511)
06-03 17:09:51.520: D/MediaPlayer(19255):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-03 17:09:51.520: D/MediaPlayer(19255):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-03 17:09:51.520: D/MediaPlayer(19255):   at dalvik.system.NativeStart.main(Native Method)
06-03 17:09:51.530: D/AndroidRuntime(19255): Shutting down VM
06-03 16:36:23.340: W/dalvikvm(15997): threadid=1: thread exiting with uncaught exception (group=0x40a431f8)
    06-03 16:36:23.350: E/AndroidRuntime(15997): FATAL EXCEPTION: main
    06-03 16:36:23.350: E/AndroidRuntime(15997): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jlennon.gametest/com.jlennon.gametest.PlayGameActivity}: java.lang.NullPointerException
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.app.ActivityThread.access$600(ActivityThread.java:123)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.os.Handler.dispatchMessage(Handler.java:99)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.os.Looper.loop(Looper.java:137)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.app.ActivityThread.main(ActivityThread.java:4424)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at java.lang.reflect.Method.invokeNative(Native Method)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at java.lang.reflect.Method.invoke(Method.java:511)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at dalvik.system.NativeStart.main(Native Method)
    06-03 16:36:23.350: E/AndroidRuntime(15997): Caused by: java.lang.NullPointerException
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at com.jlennon.gametest.PlayGameActivity.onCreate(PlayGameActivity.java:32)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.app.Activity.performCreate(Activity.java:4465)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
    06-03 16:36:23.350: E/AndroidRuntime(15997):    ... 11 more

What I;m getting from this is that my MediaPlayer.create() is returning null, and I guess that must have something to do with my file. My music file is tekno.wav.

Thanks a lot in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:18:31+00:00Added an answer on June 5, 2026 at 6:18 am
    06-03 17:09:51.520: D/MediaPlayer(19255): java.io.IOException: setDataSourceFD failed.: status=0x80000000
    

    It seems your WAV file isn’t readable by Android for some reason. See the links below for some information that may be relevant:

    setDataSourceFd Failed

    MediaPlayer.setDataSource causes IOException for valid file

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.