我想调用录音机,这个在虚拟机上可以正常运行,为什么到真机上就不行了
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);//
intent.setType("audio/amr");//intent.setType(ContentType.AUDIO_AMR);
intent.setClassName("com.android.soundrecorder","com.android.soundrecorder.SoundRecorder");
startActivityForResult(intent, 0);

解决方案 »

  1.   

    呵呵,第二句其实我这边是在上面定义了的,
    public static final String AUDIO_AMR = "audio/amr";
    和你写的一样
      

  2.   

     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.suen/com.suen.luyin}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.soundrecorder/com.android.soundrecorder.SoundRecorder}; have you declared this activity in your AndroidManifest.xml?
      

  3.   

    android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.soundrecorder/com.android.soundrecorder.SoundRecorder}; have you declared this activity in your AndroidManifest.xml?
      

  4.   

    你的activity在你的AndroidManifest.xml里面声明了没有?
      

  5.   

    你再好好理理吧,肯定是你的activity没有声明,要么就是类声明错了