解决方案 »

  1.   

    看你有没有stop过吧,如果stop过了要再start,就必须prepare一把,你可以看看这个
    http://gushedaoren.blog.163.com/blog/static/1736634052013112441219123/ 
      

  2.   

    如果直接调用public static MediaPlayer create(Context context, int resid) {
            try {
                AssetFileDescriptor afd = context.getResources().openRawResourceFd(resid);
                if (afd == null) return null;            MediaPlayer mp = new MediaPlayer();
                mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
                afd.close();
                mp.prepare();
                return mp;
            } catch (IOException ex) {
                Log.d(TAG, "create failed:", ex);
                // fall through
            } catch (IllegalArgumentException ex) {
                Log.d(TAG, "create failed:", ex);
               // fall through
            } catch (SecurityException ex) {
                Log.d(TAG, "create failed:", ex);
                // fall through
            }
            return null;
        }是不需要调用prepare的
      

  3.   

    了解下mediaplayer 的方法,start,pasue,stop,prepare,prepare是准备start的时候用到的,,,