Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No resource found that matches the given name at layout_hint

Tags:

android

xml

sdk

I am new in fact this is my first attempt to android program. I am following the android developers training website. My activity_main.xml looks like following :

<LinearLayout 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:orientation="horizontal"
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=".MainActivity" >

<EditText android:id="@+id/edit_message"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" 
    android:layout_hint="@string/edit_message"/>

Now it shows an error and warning like:

Warning - This text field does not specify an inputType or a hint

Error - error:Error:No resource found that matches the given name( at 'layout_hint' with the value '@string/edit_message')

like image 439
Nitish Avatar asked Jun 10 '13 15:06

Nitish


1 Answers

You need to define the value of edit_message in res/values/strings.xml file. As for the warning, check out this link.

like image 176
Neoh Avatar answered Oct 10 '22 02:10

Neoh