【发布时间】:2014-06-30 16:21:55
【问题描述】:
我正在 Java Eclipse 上开发一些适用于 Android 的应用程序。至于现在一切正常,但今天突然布局图形显示停止工作,无论我尝试创建新布局还是尝试打开现有布局。它显示没有 XML 内容。请为您的文档添加根视图或布局。错误。我尝试按照android sdk main.out.xml parsing error? 的说明进行操作,但我没有 XSL 选项 Eclipse -> 窗口 -> 首选项 -> 运行/调试 -> 启动 -> 启动配置 -> 过滤检查启动配置类型。我也没有任何 .out.xml 文件。
这是我的 XML 和清单文件。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
tools:context=".FirstScreenActivity" />
</RelativeLayout>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="s.manipulator"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".FirstScreenActivity"
android:label="@string/title_activity_first_screen" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="android.app.LauncherActivity" />
</activity>
<activity
android:name=".MainMenuActivity"
android:label="@string/title_activity_main_menu" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="s.manipulator.FirstScreenActivity" />
</activity>
</application>
</manifest>
【问题讨论】: