0

我在 Eclipse 中创建了一个完整的新项目。现在我想使用拖放的设计氛围。但不幸的是,图形布局没有显示。有一个类似于图形布局的地方(我已经在图片中显示),但它不起作用并且不可能在那里放置东西。我该如何解决这个问题?

在此处输入图像描述

在底部有一些错误 NullPointerException。这是它的外观:

在此处输入图像描述

布局的 .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"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.alarm_hkr.MainActivity" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />

</RelativeLayout>
4

2 回答 2

0

尝试使用另一个 android 版本来渲染布局。设置为 21 或更少。对我有帮助。(在你的截图上是绿色的 android 人物,数字为 22。)

于 2015-03-25T20:19:38.877 回答
0

在底部,有一些NullPoiterException显示。我想您正在使用的某些自定义视图有问题。如果您没有发现错误,请尝试修复并发布更多详细信息。

于 2015-03-22T12:15:54.030 回答