Reputation: 564
I've downloaded Android Studio project from git, imported it to Android Studio but I can't run it. I always get this error
Error:(7, -1) android-apt-compiler: [agent-stats-android] C:\Users\user\workspace\agent-stats-android\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
I've tried to add these files to libs folder, classpath of the SDK and "Libraries" in the project setting but nothing seems to work...
android-support-v4.jar
android-support-v7-appcompat.jar
This is not Gradle project so I can't use this approach - https://developer.android.com/tools/support-library/setup.html#libs-with-res
Upvotes: 1
Views: 1210
Reputation: 3003
Had very similar problems.
What solved it for me was:
Module settings -> Facets
And then checking 'library module' checkbox on appropriate modules. The 'Library project' property of eclipse had not carried over to android studio
Upvotes: 0
Reputation: 564
After all I switched from Android Studio to Eclipse and added the support libraries as described in this link https://developer.android.com/tools/support-library/setup.html#libs-with-res. The only thing I did differently from this approach was that I had to set the version of the Android SDK to API21 instead of (default) API19.
I hope this'll help to somebody.
Upvotes: 0
Reputation: 8774
You have to use exactly that "approach". Check the link you provided under "using android studio", under "adding libraries with resources".
Just adding the jars is not enough, there are resource files with appcompat v7 that need to be included.
Upvotes: 1