我刚刚从beta 3进入Xcode 8 beta 4,但出于任何原因我得到的错误一直没有错误或直到beta 4发布.这里是错误" Value of type 'FileManager' has no member 'urlsForDirectory'"
我的代码:
func setupRecorder(){
let audioSession:AVAudioSession = AVAudioSession.sharedInstance()
//ask for permission
if (audioSession.responds(to: #selector(AVAudioSession.requestRecordPermission(_:)))) {
AVAudioSession.sharedInstance().requestRecordPermission({(granted: Bool)-> Void in
if granted {
print("Permission Granted\n")
//set category and activate recorder session
do {
//----
let fileManager = FileManager.default
let urls = fileManager.urlsForDirectory(.documentDirectory, inDomains: .userDomainMask)
//----
let documentDirectory = urls[0] as URL
let soundURL = try! documentDirectory.appendingPathComponent("sound.m4a")
try audioSession.setCategory(AVAudioSessionCategoryPlayAndRecord)
try self.soundRecorder = AVAudioRecorder(url: soundURL, settings: self.recordSettings)
let micInput …Run Code Online (Sandbox Code Playgroud) 现在每次打开VSC时,都会收到消息“某些项目无法加载。请查看输出以获取更多详细信息。”
在输出中,我得到以下消息:
"[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files"
Run Code Online (Sandbox Code Playgroud)
我试图再次删除并安装它,但没有任何更改。谁能告诉我怎么回事和解决方法?我四处搜寻,但自己却不走运。