1

我正在尝试使用模拟器为学校构建这个应用程序,但每当我尝试构建它时,我都会收到此错误:

The document "MainStoryboard_iPhone.storyboard" could not be opened. Line 134: XML       
declaration allowed only at the start of the document

我去了问题导航器,但这就是它所显示的全部。代码中没有显示错误。

这是 XML 源代码中第 134 行所在的部分:

    </view>
                    <tabBarItem key="tabBarItem" title="Item 1" id="JGk-R6-tUe"/> //This    
is line 134
                </viewController> 
                <placeholder placeholderIdentifier="IBFirstResponder" id="2cL-Ur-7Xa"   
userLabel="First Responder" sceneMemberID="firstResponder"/>
4

2 回答 2

2

您可以右键单击 Storyboard 文件并将其作为 XML 源代码查看。

作为源代码打开

从那里您可以转到有问题的行,阅读 XML 并进行编辑,根据您的最佳判断将修复它。

于 2013-05-08T19:29:37.770 回答
1

要么编辑故事板文件,以便 Xcode 重新保存它,要么在文本编辑器中打开它,看看是否需要编辑或删除第 134 行。听起来好像有第二个标签说它是第 134 行的 XML 文件。

于 2013-05-08T19:27:03.467 回答