Why does a 'no resource error' appear while creating a button in android?
<p>I tried creating my first app in android, wherein i tried putting a simple button. After following a step by step procedure of 'how to do it' from <a href="http://developer.android.com/training/basics/firstapp/building-ui.html" rel="nofollow">http://developer.android.com/training/basics/firstapp/building-ui.html</a> i found that there are unresolved errors in the activity_main.xml file in the following line: 
android:text="@string/scan" /> </p>

<p>The error says error: Error: No resource found that matches the given name (at 'text' with value '@string/scan'). 
Can anyone tell me why and also explain how i can solve this?</p>

<p>I am pasting the whole xml file contents here:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;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"&gt;
    &lt;Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/scan" /&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>Here are the contents of sting.xml</p>

<pre><code>&lt;resources&gt;

    &lt;string name="app_name"&gt;Myaxx&lt;/string&gt;
    &lt;string name="menu_settings"&gt;Settings&lt;/string&gt;
    &lt;string name="title_activity_main"&gt;MainActivity&lt;/string&gt;

&lt;/resources&gt;
</code></pre>

<p>Here are the contents of the activity_main file.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;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"&gt;

    &lt;Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/button_scan" /&gt;
&lt;/LinearLayout&gt;
</code></pre>
