| Author |
Message |
plusminus Site Admin

Joined: 14 Nov 2007 Posts: 2067 Location: Germany
|
Posted: Mon Dec 03, 2007 8:46 am Post subject: |
|
|
Hey zaac,
perhaps you forgot to change the main.xml or didn't add the -useaudio in the (Run)-configurations.
If you use the debugger to locate the line, the NullPointerException gets thrown, would make it easier to help.
Regards,
plusminus _________________
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
zaac Freshman
Joined: 03 Dec 2007 Posts: 4 Location: France
|
Posted: Mon Dec 03, 2007 10:10 am Post subject: |
|
|
My main.xml is ok and i have make -useaudio
Now i can't launch, i have this on the console:
| Code: | [2007-12-03 10:08:04 - musicplayer] ------------------------------
[2007-12-03 10:08:04 - musicplayer] Android Launch!
[2007-12-03 10:08:04 - musicplayer] Launching: org.anddev.android.musicplayer.musicplayer
[2007-12-03 10:08:04 - musicplayer] WARNING: Unknown device build id
[2007-12-03 10:08:04 - musicplayer] Pushing musicplayer.apk to /data/app on the device
[2007-12-03 10:08:21 - musicplayer] Failed to install musicplayer.apk on device #1: Unknown Error
[2007-12-03 10:08:21 - musicplayer] Unknown Error |
|
|
| Back to top |
|
 |
plusminus Site Admin

Joined: 14 Nov 2007 Posts: 2067 Location: Germany
|
Posted: Mon Dec 03, 2007 3:31 pm Post subject: |
|
|
Hey zaac,
that Error is really strange
| Quote: | | WARNING: Unknown device build id |
Seems like you Emulator-Image is corrupt...
You could try the following (reset the emulator-rom): (click)
If that dosn't help: Final 'solution' redownload the whole SDK
Regards,
plusminus _________________
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
zaac Freshman
Joined: 03 Dec 2007 Posts: 4 Location: France
|
Posted: Mon Dec 03, 2007 4:02 pm Post subject: |
|
|
It work now but it begin to play only if i click on the volume:
Could you do an archive zip witch the full project ? |
|
| Back to top |
|
 |
plusminus Site Admin

Joined: 14 Nov 2007 Posts: 2067 Location: Germany
|
Posted: Mon Dec 03, 2007 9:10 pm Post subject: |
|
|
Hello zaac,
please tell us how did you handle the Error you had before, so everybody can learn from it
When you hit the Sound-Buttons, you will always hear a sound coming out (if you started with -useaudio)
Just because it is you :The full source (without the song )
Regards,
plusminus _________________
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
lancelot Once Poster
Joined: 04 Dec 2007 Posts: 1
|
Posted: Tue Dec 04, 2007 1:44 pm Post subject: |
|
|
Hello everyone..
I was trying to make this aplication work but I´m still gettind this message..
I have no idea what I´m doing wrong, can someone tell me what it could be???.
The program starts ok, but if i press the button I get that message..
Thanks.. |
|
| Back to top |
|
 |
Katharnavas Senior Developer
Joined: 04 Dec 2007 Posts: 100 Location: India
|
Posted: Tue Dec 04, 2007 2:02 pm Post subject: |
|
|
| zaac wrote: | Yes it is the solution but now i have an other bug when i click on the button play:
|
Hi,
What i hope was mp is not getting initialized. Because for me also the audio is not getting played but no error. |
|
| Back to top |
|
 |
plusminus Site Admin

Joined: 14 Nov 2007 Posts: 2067 Location: Germany
|
|
| Back to top |
|
 |
dave007 Freshman
Joined: 30 Nov 2007 Posts: 4
|
Posted: Wed Dec 05, 2007 2:28 am Post subject: me again |
|
|
Hello everybody!
I really thank you plusminus for your help. now i can listen music with the player. I really don't understand why it doesn't worked but in this way, i have no any errors. thank you! |
|
| Back to top |
|
 |
NumBeast Freshman
Joined: 09 Dec 2007 Posts: 6
|
Posted: Sun Dec 09, 2007 10:12 pm Post subject: Need to access files |
|
|
I have had the same problem as you guys. Debugging shows that on
| Java: | MediaPlayer mp = MediaPlayer.create(this, R.raw.yourmp3); |
mp is not created, so you get an null pointer exception when you try to call a method on mp, namely
I have tried doing an adb push, but the MediaPlayer does not want to read the file, and when I try to emulate an sd card, the file won't open either. I thought it was a permission problem so I went into the adb shell and chmod'ed the sound file, but that didn't help at all.
As a side note: When I point the media player at /system/media/audio/ringtones I can play all four ringtones, so I know my sound is working.
If you have any ideas on how to fix this, please tell me. I'm trying to make a media player and you can see how not being able to play sounds would be a problem for such an app. |
|
| Back to top |
|
 |
living_sword Junior Developer
Joined: 23 Nov 2007 Posts: 18
|
Posted: Mon Dec 10, 2007 1:34 pm Post subject: Re: Need to access files |
|
|
| switch to DDMS view and check if you see 'sdcard' in the File Explorer. |
|
| Back to top |
|
 |
NumBeast Freshman
Joined: 09 Dec 2007 Posts: 6
|
Posted: Tue Dec 11, 2007 5:03 am Post subject: re |
|
|
| I know the SDcard works, I can view it with the file browser. |
|
| Back to top |
|
 |
living_sword Junior Developer
Joined: 23 Nov 2007 Posts: 18
|
Posted: Tue Dec 11, 2007 7:23 am Post subject: |
|
|
| post the code. that would give us a better idea of the problem. |
|
| Back to top |
|
 |
Asgard Junior Developer
Joined: 15 Dec 2007 Posts: 16
|
Posted: Sun Dec 16, 2007 9:21 pm Post subject: |
|
|
I have the same problem with not initialized player (mp = null). If smd knows what is wrong with provided example, please let me know, because this all makes me crazy. _________________ Catch the moment |
|
| Back to top |
|
 |
plusminus Site Admin

Joined: 14 Nov 2007 Posts: 2067 Location: Germany
|
Posted: Sun Dec 16, 2007 9:28 pm Post subject: |
|
|
Hello Asgard,
did you try the second possible solution too
http://www.anddev.org/viewtopic.php?p=580#580
If that doesn't work too, try a file that is shipped with the emulator. (Somewhere in System-Media-Ringtones...)
Regards,
plusminus _________________
| Android Development Community / Tutorials
Last edited by plusminus on Sun Dec 16, 2007 10:01 pm; edited 2 times in total |
|
| Back to top |
|
 |
|