I am having problems setting up my eclipse program with Android for my first project. After installing eclipse together with the android developer tools, I tried to create a new 'Android Project' with a minimum sdk of Android 2.2, a target sdk of Android 6.0 and a sdk compiler of Android 7.1.1.
After clicking run, Eclipse displayed an error, which indicated that there was issues with my empty activity: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light' I have done my research for this problem and most of the solutions suggested importing an Android Project called "AppCompat-v7". However, upon selecting the file, there were no projects found that could be imported. This is what I see: Import project window:
I have spent numerous hours trying to fix this issue. I have ensured that both my eclipse program and all android files are under the same hard disk, I have tried adding the file to the build path etc. but the same problem persists. Anyone out there who can help me with this issue please? I would greatly appreciate it :) If you need more details regarding what I have done so far, feel free to contact me!
Someone commented below suggesting that I import the "AppCompat-v7" folder to the package explorer and then go to Project->Properties to add the appcompat library folder. I managed to add the folder to my package explorer but I am not able to add the library to the project, as no library options show up. This is even so after checking the "IsLibrary" box.
if you have Appcompat v7 in your extras folder follow this link but if you don't have it:
To download the Support Library through the
SDK Manager
:After downloading, the tool installs the Support Library files to your existing Android SDK directory. The library files are located in the following subdirectory of your SDK:
<sdk>/extras/android/m2repository/com/android/support/
directory.Update: Import it like this picture
you are now have your library in your project Explorer like this
the rest is adding library project
AppCompat-v7 should be added to your module Gradle file. It goes in the dependencies section.
For example: