java.lang.RuntimeException: setAudioSource failed

后端 未结 8 2131
灰色年华
灰色年华 2021-01-01 15:13

I am new to android development. I am just trying to record an audio with android studio(2.1.1) testing with 6.0.1 Marshmallow device.

public class MainActiv         


        
8条回答
  •  心在旅途
    2021-01-01 15:46

    Try this.Hope it helps you

    change 
    
    recorder.setAudioSource(1);
    
    to
    
    recorder.setAudioSource(MediaRecorder.AudioSource.MIC); in your startRecord method.
    

提交回复
热议问题