title: Create Android project from source in Eclipse: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'
body: <p>Developing Android apps in Eclipse.</p>
  
  <p>I created an app in another app's workspace by mistake.  I want to move it to its own workspace.  For reasons I can't explain, the original workspace is now corrupt, but before I started I tar'ed up my app (project directory and all sub dirs) in a working state.  This tar is what I have to work with.</p>
  
  <p>So I...</p>
  
  <ul>
  <li>Create a new workspace</li>
  <li>Untar my backup tar file into (say) ~/scratch</li>
  <li>File -> Import -> Android -> Existing Android Code Into Workspace.</li>
  <li>Set "root directory" to ~/scratch/myApp</li>
  <li>Tick "copy files into workspace"</li>
  <li>Click Finish</li>
  </ul>
  
  <p>The file hierarchy is now visible in the Package Explorer, but there are many (~100) red lines in the Console, which I think all boil down to much the same thing, so let's just look at the first Error in the Problems tab:</p>
  
  <blockquote>
    <p>error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.   styles.xml  /myApp/res/values   line 7  Android AAPT Problem</p>
  </blockquote>
  
  <p>Some googling suggests that this is because I need "appcompat_v7" in my workspace, and for myApp to use it as a library.  (Is this right?!)  This is where I get stuck.</p>
  
  <p>The short version is: "How do I add this?"</p>
  
  <p>This is what I tried.  (I've also tried variations on this theme, too many to list or even remember.)</p>
  
  <ul>
  <li>File -> Import -> Android -> Existing Android Code Into Workspace.</li>
  <li>Set "root directory" to /home/mark/Development/adt-bundle-linux-x86-20140702/sdk/extras/android/support/v7/appcompat</li>
  <li>Untick "copy files into workspace"</li>
  <li>Click Finish</li>
  </ul>
  
  <p>(I would then go to Package Explorer -> myApp -> Properties -> Project References and check "android-support-v7-appcompat but I won't do that for now because...)</p>
  
  <p>The Console has another 100 or so red lines, and we have another "Error":</p>
  
  <blockquote>
    <p>error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.    styles_base.xml /android-support-v7-appcompat/res/values-v21    line 75 Android AAPT Problem</p>
  </blockquote>
  
  <p>I must be doing something wrong here.  My feeling is that the importing-my-app part is probably about right - I can at least understand why it can't find 'Theme.AppCompat.Light'.  But the appcompat import seems to have gone completely wrong.</p>
  
  <p>Any help gratefully received!  I've been hacking around with this for several hours now and can't get any closer.  (I have managed, however, to damage by original workspace so that that no longer works either.  Brilliant.)</p>
  
  <p>Thanks!
  -Mark</p>