java.lang.NoSuchMethodError: No virtual method (Ljava/io/File;)V in class Landroid/media/MediaRec...

不同的版本,api的不同

recorder = (if (Build.VERSION.SDK_INT >=Build.VERSION_CODES.S){

MediaRecorder(context)

}else { MediaRecorder() }).also {

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O){

it.setOutputFile(outFile.absolutePath)

}else{

it.setOutputFile(outFile)

}

}

你可能感兴趣的:(java.lang.NoSuchMethodError: No virtual method (Ljava/io/File;)V in class Landroid/media/MediaRec...)