Interface Builder Storyboard Error: Extra Content at end of Document </document>

Interface Builder Storyboard Error: Extra Content at end of Document </document>

尝试构建一个我一直在开发的 iOS 应用程序。由于 Interface Builder Storyboard 错误,应用程序无法在 Xcode 中构建。错误说明如下:第 1917 行:文档末尾的额外内容。因为我不太了解 XML 我不确定这意味着什么。我继续查看 1917 行,没有发现任何异常。我已经粘贴了下面的代码。

 ...

                                            <fontDescription key="fontDescription" name="Avenir-Medium" family="Avenir" pointSize="17"/>
                                            <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
                                            <nil key="highlightedColor"/>
                                        </label>
                                    </subviews>
                                    <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="807" id="IAL-D2-vfe"/>
                                        <constraint firstAttribute="width" constant="320" id="cx9-gU-K2n"/>
                                    </constraints>
                                </view>
                            </subviews>
                            <constraints>
                                <constraint firstAttribute="bottom" secondItem="cx5-hW-gTM" secondAttribute="bottom" id="OCs-ZO-mvB"/>
                                <constraint firstAttribute="trailing" secondItem="cx5-hW-gTM" secondAttribute="trailing" id="Ta0-VQ-uTp"/>
                                <constraint firstItem="cx5-hW-gTM" firstAttribute="leading" secondItem="dOU-bF-OGq" secondAttribute="leading" id="kT2-8I-HEq"/>
                                <constraint firstItem="cx5-hW-gTM" firstAttribute="top" secondItem="dOU-bF-OGq" secondAttribute="top" constant="2" id="qu9-4d-3NK"/>
                            </constraints>
                        </scrollView>
                    </subviews>
                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                    <constraints>
                        <constraint firstItem="dOU-bF-OGq" firstAttribute="top" secondItem="TBe-Zs-WOZ" secondAttribute="bottom" constant="11" id="JUw-yu-Qdo"/>
                        <constraint firstItem="2qZ-RL-eYQ" firstAttribute="top" secondItem="dOU-bF-OGq" secondAttribute="bottom" id="Tvb-Gd-Bhy"/>
                        <constraint firstAttribute="trailingMargin" secondItem="dOU-bF-OGq" secondAttribute="trailing" constant="-16" id="ZdR-Kp-fgz"/>
                        <constraint firstItem="dOU-bF-OGq" firstAttribute="leading" secondItem="8TP-eR-rCw" secondAttribute="leadingMargin" constant="-16" id="vf5-iR-dEo"/>
                    </constraints>
                </view>
                <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
            </viewController>
            <placeholder placeholderIdentifier="IBFirstResponder" id="35W-fT-l2q" userLabel="First Responder" sceneMemberID="firstResponder"/>
        </objects>
        <point key="canvasLocation" x="-377" y="1720"/>
    </scene>
</scenes>
<resources>
    <image name="BalContent" width="22" height="22"/>
    <image name="Balance" width="25" height="25"/>
    <image name="Business" width="185" height="100"/>
    <image name="Culture" width="185" height="100"/>
    <image name="Design" width="185" height="100"/>
    <image name="Discover" width="25" height="25"/>
    <image name="Explore" width="375" height="100"/>
    <image name="Feed" width="25" height="25"/>
    <image name="Followers" width="22" height="22"/>
    <image name="Food" width="185" height="100"/>
    <image name="Health" width="185" height="100"/>
    <image name="Link" width="50" height="50"/>
    <image name="Logo" width="150" height="38"/>
    <image name="News" width="187" height="100"/>
    <image name="Notification" width="22" height="22"/>
    <image name="Photo" width="50" height="50"/>
    <image name="Popular" width="375" height="100"/>
    <image name="Profile" width="25" height="25"/>
    <image name="ProfileDefault" width="125" height="125"/>
    <image name="Settings" width="22" height="22"/>
    <image name="Splash-iphone6" width="375" height="667"/>
    <image name="Sports" width="185" height="100"/>
    <image name="Style" width="185" height="100"/>
    <image name="Technology" width="187" height="100"/>
    <image name="Travel" width="185" height="100"/>
    <image name="Trending" width="375" height="100"/>
    <image name="Video" width="50" height="50"/>
    <image name="Write" width="50" height="50"/>

    <image name="leonidas" width="116" height="92"/>
    <image name="person-icon.png" width="375" height="667"/>

    <image name="backarrow" width="22" height="22"/>

</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
    <simulatedStatusBarMetrics key="statusBar"/>
    <simulatedOrientationMetrics key="orientation"/>
    <simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
    <segue reference="AGt-rP-bot"/>
    <segue reference="Ga5-Lv-IzP"/>
</inferredMetricsTieBreakers>

第 1917 行: <-- 此行出现在文档末尾但不会显示

我刚遇到同样的问题。我认为它发生了我拉动并进行了合并以解决冲突。当它说 Extra Content at end of Document </document> 时,我认为它在 xml 中找到了额外的标签。所以我点击了版本编辑器并检查了更改的内容并找到了额外的标签。单击并丢弃零钱,一切顺利。

检查屏幕截图。

如果有人对此有详细了解,请随时编辑并添加更多详细信息。