AndrinoG
AndrinoG

Reputation: 71

Missing resource name

I apologize if this is a really dumb question. I tried very hard to find an answer on the site.

I am an Android newcomer. When I ran the first sample "Hello world" application that appears when you install Android studio, one of the lines had a problem called "missing resource name" on @+id of the following code.

How can I fix this issue? Thanks in advance!

<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:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"
android:id="@+id/">

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

</RelativeLayout>

Upvotes: 0

Views: 1341

Answers (1)

Mohammad Rahchamani
Mohammad Rahchamani

Reputation: 5220

you should just delete the line android:id="@+id/" or give an ID to your RelativeLayout android:id="@+id/some_id"

Upvotes: 3

Related Questions