Hi, I am trying to use a SoundPoll to play some sound when i press a button. So I have used the code taken from this page:
http://www.anddev.org/using_soundpool_instead_of_mediaplayer-t3115.html When I try to run on my emulator I have this error: D/AndroidRuntime( 328): Shutting down VM W/dalvikvm( 328): threadid=3: thread exiting with uncaught exception (group=0x4001b188) E/AndroidRuntime( 328): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 328): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.ikeralbeniz.fundroid/ net.ikeralbeniz.fundroid.MainActivity}: android.content.res.Resources $NotFoundException: File res/raw/zas.mp3 from drawable resource ID #0x7f04000a E/AndroidRuntime( 328): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2454) E/AndroidRuntime( 328): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2470) E/AndroidRuntime( 328): at android.app.ActivityThread.access $2200(ActivityThread.java:119) E/AndroidRuntime( 328): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1821) E/AndroidRuntime( 328): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 328): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 328): at android.app.ActivityThread.main(ActivityThread.java:4310) E/AndroidRuntime( 328): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 328): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 328): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime( 328): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/AndroidRuntime( 328): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 328): Caused by: android.content.res.Resources $NotFoundException: File res/raw/zas.mp3 from drawable resource ID #0x7f04000a E/AndroidRuntime( 328): at android.content.res.Resources.openRawResourceFd(Resources.java:859) E/AndroidRuntime( 328): at android.media.SoundPool.load(SoundPool.java:174) E/AndroidRuntime( 328): at net.ikeralbeniz.fundroid.MainActivity.onStart(MainActivity.java:53) E/AndroidRuntime( 328): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java: 1129) E/AndroidRuntime( 328): at android.app.Activity.performStart(Activity.java:3723) E/AndroidRuntime( 328): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2426) E/AndroidRuntime( 328): ... 11 more E/AndroidRuntime( 328): Caused by: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed E/AndroidRuntime( 328): at android.content.res.AssetManager.openNonAssetFdNative(Native Method) E/AndroidRuntime( 328): at android.content.res.AssetManager.openNonAssetFd(AssetManager.java:411) E/AndroidRuntime( 328): at android.content.res.Resources.openRawResourceFd(Resources.java:856) E/AndroidRuntime( 328): ... 16 more I am using netbeans so I have edited de building xml to set -0 mp3 (or -0 .mp3) to the aapt but nothing changed.. I still have the same problem opening the mp3 files from raw.. any idea? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

