【问题标题】:eclipse ADT graphical Layouteclipse ADT 图形布局
【发布时间】:2011-10-17 07:01:51
【问题描述】:

我正在尝试查看我的 android xml 文件布局设计视图,但它没有显示,我使用 eclipse 和 ADT 在 XML 中进行了一些设计,

当我单击图形布局时,它不显示任何内容并显示“缺少主题”,我也尝试过:右键单击 XML 文件>openwith>android 布局编辑器,但无济于事。
我的开发环境是:

Eclipse Helios 服务版本 2,
Android 开发工具包版本:12.0.0.v201106281929-138431,
Dalvik 调试监控服务版本:12.0.0.v201106281929-138431,
Traceview版本:12.0.0.v201106281929-138431.
可能是什么问题?

我的xml文件如下

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/RelativeLayout01"android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/relativeLayout1">
<RelativeLayout android:id="@+id/RelativeLayout02"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<RelativeLayout android:id="@+id/RelativeLayout05"
android:layout_below="@id/RelativeLayout04" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:background="@color/brightblue">
<TextView android:id="@+id/TextView06"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/SaveMyBackupTo" android:textColor="@color/black"
android:textStyle="bold" android:layout_marginLeft="5dip"
android:lines="2" android:layout_alignParentLeft="true"
android:singleLine="false" android:layout_toLeftOf="@+id/Button09"
android:layout_marginTop="5dip"></TextView>
<CheckBox android:id="@+id/CheckBox01" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:text="@string/EnableAutoSave"
android:textColor="@color/black" android:layout_below="@+id/Button09"></CheckBox>
<Button android:id="@+id/Button09" android:layout_alignParentRight="true" android:textSize="12dip"
android:layout_width="wrap_content" android:layout_height="30dip"
android:text="Memory Card" android:layout_marginTop="5dip"></Button>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>

我上传了一张截图here
我注意到我的标题栏选择选项菜单不可更改的一件事。

【问题讨论】:

  • 请添加您的 XML 代码,也许其中有一个小错误?

标签: android eclipse android-layout eclipse-plugin android-xml


【解决方案1】:

尝试从下拉列表中更改SDK level/version。它每次都为我解决了这个问题。

【讨论】:

  • 嗨,谢谢,我正在使用 android 2.2,现在从下拉列表中我将 android 2.3 有时更改为 3.0,因此我在选择不同的选项后再次选择 2.2,这使得组件面板在左侧可见一边,然后我只是从它在 Pallete 中的位置拖动一个组件,这使得图形布局可见。谢谢@Sheikh Aman
  • 很高兴知道它有效。如果您的问题得到解决,请将任何答案(解决了您的问题)标记为已接受的答案
【解决方案2】:

我遇到了同样的问题。解决方案发布here

【讨论】:

    猜你喜欢
    • 2011-10-21
    • 2013-11-15
    • 2012-02-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-19
    • 1970-01-01
    • 2012-03-02
    相关资源
    最近更新 更多