Monotouch错误:mtouch退出代码1

时间:2013-12-12 11:27:25

标签: ios xamarin.ios xamarin-studio

我有一个很大的问题。 我是ios应用程序世界的新客户,我正在尝试使用Xamarin Studio。 这是在我的ios设备上启动调试后的输出错误:iphone ios 7.0.4。 Monotouch 5.0.1和Xamarin 4.0.5版 有人可以帮帮我吗?! ios模拟器正常运行(调试和发布模式),但我无法在我的iphone上部署应用程序。

这里使用iPhone模拟器7.0构建输出。 试图自己解决问题我已经使情况变得更糟,现在我也无法使用模拟器进行调试。

Performing main compilation...
/Developer/MonoTouch/usr/bin/smcs /noconfig "/out:/Users/Blumotix/Projects/HelloWorld/HelloWorld/bin/iPhoneSimulator/Debug/HelloWorld.exe" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 "/define:DEBUG;__MOBILE__;__IOS__"  /t:exe "/Users/Blumotix/Projects/HelloWorld/HelloWorld/Main.cs" "/Users/Blumotix/Projects/HelloWorld/HelloWorld/AppDelegate.cs" "/Users/Blumotix/Projects/HelloWorld/HelloWorld/HelloWorldViewController.cs" "/Users/Blumotix/Projects/HelloWorld/HelloWorld/HelloWorldViewController.designer.cs" 
Generazione completata -- 0 errori, 0 avvisi

Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -v --nomanifest --nosign -sim "/Users/Blumotix/Projects/HelloWorld/HelloWorld/bin/iPhoneSimulator/Debug/HelloWorld.app" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -debug -nolink -sdk "7.0" "/Users/Blumotix/Projects/HelloWorld/HelloWorld/bin/iPhoneSimulator/Debug/HelloWorld.exe"
Framework does not exist /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk
   Platform = iPhoneSimulator
   SDK = 7.0
   Deployment Version: 3.0
Framework is: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk

Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/SDKSettings.plist".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.Xml.XmlUrlResolver.GetEntity (System.Uri absoluteUri, System.String role, System.Type ofObjectToReturn) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.GetStreamFromUrl (System.String url, System.String& absoluteUriString) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadTextReader (Int32 remained) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.PeekChar () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.EntityResolvingXmlReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.DTDValidatingReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml.DTDValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.Schema.XsdValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.String filename) [0x00000] in <filename unknown>:0 
  at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.DirectoryNotFoundException: Could not find a part of the path "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/SDKSettings.plist".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.Xml.XmlUrlResolver.GetEntity (System.Uri absoluteUri, System.String role, System.Type ofObjectToReturn) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.GetStreamFromUrl (System.String url, System.String& absoluteUriString) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadTextReader (Int32 remained) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.PeekChar () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.EntityResolvingXmlReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.DTDValidatingReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml.DTDValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.Schema.XsdValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.String filename) [0x00000] in <filename unknown>:0 
  at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0 
mtouch exited with code 1

感谢。 即

1 个答案:

答案 0 :(得分:1)

那是因为MonoTouch 5.0.1过于陈旧 - 它是在两年多前发布的。

自发布以来,Apple改变了部分.plist文件的格式:从XML到二进制格式。

您需要更新到更新版本的Xamarin.iOS(MonoTouch的新名称),它将这些文件作为二进制文件处理。由于您使用的是最新的Xcode,我建议您使用最新的Xamarin.iOS版本(当前版本7.0.x)。