Failed to get parent for element: no resource was found that matches the specified name "Theme.AppCompat.Light". MY R.java is missing

Now Google has Android Lollipop, I opened the sdk manager and decided to update a couple of packages ... It makes me faster with 2 days. Can't find topic

I also tried this: Failed to rename directory

Unsuccessful. I tried downloading a new sdk from google and installing from scratch, didn't work again. Here's a mistake.

D:\~\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.

 D:\~\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.

D:\~\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.


  [1]: https://stackoverflow.com/questions/8839255/failed-to-rename-directory-tools-to-temp-toolpackage-old01-in-c-android-sdk-win

      

I will be very grateful if someone can help me try to get my eclipse Juno running. I can also say that some of my old apps work with a lower version, but when I create a new one ... the error is:

import android.support.v7.app.ActionBarActivity;

It does not read android.suppor.v7 file

then if i link to my android app i have! sign and a lot of errors like:

   D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
 D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
 D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

      

+3


source to share


4 answers


For me with the latest (21.0.2) version of Android Support Library, the solution was to change the build target for the appcompat_v7 project to API 21 (Android 5.0), clean up and rebuild.



+1


source


I solved the problem of changing in gradle

compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:support-v4:21.0.0'

      

to



compile 'com.android.support:appcompat-v7:19.0.0'
compile 'com.android.support:support-v4:19.0.0'

      

and compile / target sdk to 19

+3


source


Have you tried updating the target SDK to 21 and building the project?

0


source


You have the same problem ... Perhaps one solution is to download the old sdk and not update it.

0


source







All Articles