title: could not resolve resource android eclipse
body: <p>I am new in andorid development.
  I have created my android first project according to <a href="http://developer.android.com/training/basics/firstapp/creating-project.html" rel="nofollow noreferrer">http://developer.android.com/training/basics/firstapp/creating-project.html</a></p>
  
  <p>And here is the code that I have as the project was created(no changes are done in code by me)</p>
  
  <pre><code>&lt;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=".MainActivity" &gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/hello_world" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is the screenshot of the Graphical layout
  <a href="http://imageshack.us/a/img35/5284/android1s.png" rel="nofollow noreferrer">http://imageshack.us/a/img35/5284/android1s.png</a></p>
  
  <p>So, it looks fine for now, but if I want to change the text <code>Hello world</code> to , say, <code>hello</code>, so the code's part looks like <code>android:text="@string/hello"</code>, I get the error </p>
  
  <p><code>NOTE: This project contains resource errors, so aapt did not succeed, which can cause rendering failures. Fix resource problems first.</code></p>
  
  <p>and </p>
  
  <p><code>Couldn't resolve resource @string/hello</code>, and the text in graphical layout becomes
  <code>@string/hello</code>, as it is in this image</p>
  
  <p><a href="http://imageshack.us/a/img826/7735/android2p.png" rel="nofollow noreferrer">http://imageshack.us/a/img826/7735/android2p.png</a></p>
  
  <p>But I noticed one thing:
  If after this error I go to <code>res/values/strings.xml</code> and add <code>String</code> with name and value <code>hello</code>, like</p>
  
  <p><a href="http://img842.imageshack.us/img842/8108/android3s.png" rel="nofollow noreferrer">http://img842.imageshack.us/img842/8108/android3s.png</a></p>
  
  <p>The error disappears and I can see the word <code>hello</code> in the graphical layout.</p>
  
  <p>I tried these so far</p>
  
  <ol>
  <li>Using <code>ctrl+shift+s</code> like it is described here <a href="https://stackoverflow.com/a/14462434/932473">https://stackoverflow.com/a/14462434/932473</a> </li>
  <li>Closing and reopening Eclipse.</li>
  <li>cleaning, rebulding</li>
  <li>removing the entire project and creating again.</li>
  </ol>
  
  <p>The <code>values</code> folder does exist in <code>res</code>.</p>
  
  <p>None of these questions solved my problem</p>
  
  <p><a href="https://stackoverflow.com/questions/9240995/eclipse-could-not-resolve-string-resource-error">Eclipse could not resolve string resource error</a></p>
  
  <p><a href="https://stackoverflow.com/questions/14427890/cant-resolve-android-resource-strings">Can&#39;t Resolve Android Resource Strings</a></p>
  
  <p><strong>UPDATED</strong>
  If I write like this <code>android:text="hello"</code>
  I get this warning in eclipse 
  <code>Hardcoded string "hello", should use @string resource</code>,</p>
  
  <p>I do not get it every time I want to use some string like <code>android:text="@string/hello2"</code>, I have to first manually specify <code>hello2</code> it in <code>strings.xml</code> ?</p>