Riyana
Riyana

Reputation: 241

Why Graphical layout (for android) doesn't appear in Eclipse?

I have created a complete new project in Eclipse. Now I want to use the design mood for drag-drop. But unfortunately the graphical layout isn't showing. There is a place which is similar to graphical layout (that I have shown in picture), but it doesn't work and it's not possible to drop something there. How could I fix this?

enter image description here

At the bottom there are some error NullPointerException. This is how it looks:

enter image description here

.XML file for the layout:

    <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>

Upvotes: 0

Views: 293

Answers (2)

shww
shww

Reputation: 21

Try to use another android version for rendering layouts. Set 21 or less. Helps for me. (It's green android figure with number 22 on your screenshot.)

Upvotes: 0

Lamorak
Lamorak

Reputation: 11137

At the bottom, there is some NullPoiterException showing. I suppose there is something wrong with some custom view you are using. Try to fix that and post some more details if you don't find the error..

Upvotes: 0

Related Questions