MediaRecorder在按下按钮时无法崩溃

时间:2013-11-19 21:47:00

标签: android

我复制了这个

#4  Tutorial: Record media via MediaRecorder

< http://www.vogella.com/articles/AndroidMedia/article.html>

进入我的项目

并且遇到了这些错误..

11-19 16:33:26.416   432   432 I ActivityManager: START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.pm.a121212/.OtherAct} from pid 913
11-19 16:33:26.536   432   754 I ActivityManager: Start proc com.pm.a121212 for activity com.pm.a121212/.OtherAct: pid=21863 uid=10241 gids={3003, 1015}
11-19 16:33:26.826 21863 21863 D WebSettings: mDataPath: /data/data/com.pm.a121212
11-19 16:33:26.886 21863 21863 D WebSettings: mDataPath: /data/data/com.pm.a121212
11-19 16:33:27.567 21863 21892 E chromium: external/chromium/net/disk_cache/stat_hub.cc:213: [1119/163327:ERROR:stat_hub.cc(213)] StatHub::Init - App com.pm.a121212 isn't supported.
11-19 16:33:27.577 21863 21892 E chromium: external/chromium/net/disk_cache/stat_hub.cc:213: [1119/163327:ERROR:stat_hub.cc(213)] StatHub::Init - App com.pm.a121212 isn't supported.
11-19 16:33:27.817   432   508 I ActivityManager: Displayed com.pm.a121212/.OtherAct: +1s315ms
11-19 16:33:28.208   432   780 I ActivityManager: START {cmp=com.pm.a121212/com.revmob.ads.fullscreen.FullscreenActivity (has extras)} from pid 21863
11-19 16:33:28.488   432   508 I ActivityManager: Displayed com.pm.a121212/com.revmob.ads.fullscreen.FullscreenActivity: +267ms
11-19 16:33:37.407   432   699 I ActivityManager: START {cmp=com.pm.a121212/.MainActivity} from pid 21863
11-19 16:33:38.539   432   699 I ActivityManager: START {cmp=com.pm.a121212/com.revmob.ads.fullscreen.FullscreenActivity (has extras)} from pid 21863
11-19 16:33:39.039   432   454 W ActivityManager: Activity pause timeout for ActivityRecord{418ec100 com.pm.a121212/.MainActivity}
11-19 16:33:40.561   432   508 I ActivityManager: Displayed com.pm.a121212/.MainActivity: +3s119ms
11-19 16:33:40.561   432   508 I ActivityManager: Displayed  com.pm.a121212/com.revmob.ads.fullscreen.FullscreenActivity: +1s525ms
11-19 16:33:59.821 21863 21863 E AndroidRuntime: at   com.pm.a121212.MainActivity.startRecording(MainActivity.java:88)
11-19 16:33:59.831   432   653 E EmbeddedLogger: App crashed! Process: com.pm.a121212
11-19 16:33:59.831   432   653 E EmbeddedLogger: App crashed! Package: com.pm.a121212 v4 (1.0)
11-19 16:33:59.851   432   653 W ActivityManager:   Force finishing activity com.pm.a121212/.MainActivity
11-19 16:34:00.382   432   454 W ActivityManager: Activity pause timeout for ActivityRecord{418ec100 com.pm.a121212/.MainActivity}
11-19 16:34:03.085   432   835 I ActivityManager: Process com.pm.a121212 (pid 21863) has died.
11-19 16:34:03.105   432   835 W ActivityManager: Force removing ActivityRecord{41066260 com.pm.a121212/.OtherAct}: app died, no saved state
11-19 16:34:03.125   432   515 W InputDispatcher: channel '41c58620 com.pm.a121212/com.pm.a121212.OtherAct (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
11-19 16:34:03.125   432   515 E InputDispatcher: channel '41c58620 com.pm.a121212/com.pm.a121212.OtherAct (server)' ~ Channel is unrecoverably broken and will be disposed!
11-19 16:34:03.155   432   515 W InputDispatcher: Attempted to unregister already unregistered input channel '41c58620 com.pm.a121212/com.pm.a121212.OtherAct (server)'
11-19 16:34:03.155   432   515 I WindowManager: WINDOW DIED Window{41c58620 com.pm.a121212/com.pm.a121212.OtherAct paused=false}
11-19 16:34:03.195   432   780 I WindowManager: WIN DEATH: Window{41f902d0 com.pm.a121212/com.pm.a121212.MainActivity paused=false}

我在

的空间出错了
    startButton.setEnabled(false);


我是否使用,,

    recorder.setAudioSource(MediaRecorder.AudioSource.MIC);

             recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);

我想录制从应用生成的音频。说我有4个有声音的按钮。如何记录用户随时间推移的声音创建的音频?

但我甚至无法让它工作

0 个答案:

没有答案