Reputation: 1035
This is copied straight from a question I asked on Google Groups:
I'm having problems using ABS in Eclipse(Indigo). I'm using ABS 4.1.0. I created a project from /library in Eclipse, set build target to 14, minSdk to 14, Java compliance level to 1.6 as I've been told. There are no errors in the ABS project, but in my own project, minSdk 7, targetSdk 14, build target 14 and ABS added as a library, I get this error in the AndroidManifest.xml:
Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.Sherlock')
even though I've imported ABS.
Also, R.java refuses to generate, so I also have a bunch of "R cannot be resolved to a variable" in my class. Are the two related?
Please tell me if you need more info.
Help would be appreciated.
Upvotes: 4
Views: 3919
Reputation: 301
I finally find the solution:
In this place, your project "library" must to be done (without errors)
Already, your project must to be done. If the error persist, restart Eclipse.
Upvotes: 0
Reputation: 21
In my case the lib was on another harddisk (not in the eclipse workspace). It worked after I moved the lib-project into the work-space.
Upvotes: 2
Reputation: 1035
Well, that certainly made me feel stupid. But now I can sleep well(things like these always keep me up at night).
What caused my problem was simply that the library wasn't on the same drive as my workspace(D: and C:, respectively), so Eclipse couldn't create a relative path between the two. I simply moved the library to C: and it worked.
Thanks to this question that put me on the right path.
Upvotes: 2
Reputation: 83311
Try changing your target API level (of both the ActionBarSherlock project and yours) to 15.
android:targetSdkVersion="15"
.Also, remove the referenced library (the one with the red X) and re-add it again. There should now be a green check. Everything should work I believe once you do this.
Upvotes: 0
Reputation: 3494
1) Remove library-4.0.0.jar and android-support-4.0.jar from your project's lib directory (or un-link it). The setup-guide is a bit unclear on this, in my opinion. The android-support-library only needs to be added to the ABS-Library-Project, not your project.
2) Try cleaning both your Library Project and your implementation project. In addition, right-click each of the projects and select Android --> Fix project properties
3) Check that the "Is Library"-checkbox on the Properties-->Android screen of the Library Project is checked, and that you've added the library project on this screen in the implementation-project (and NOT as an external/Java-library)
4) Try importing the "ABS Sample Project" that can be downloaded from the ABS website to see if you get the same error there.
5) In the Java-classes where you get errors relating to "R cannot be resolved...", check that you're importing import com.yourcompany.yourapp.R;
rather than the ABS-R
. Fix any errors that you're getting there (or simply temporarily remove the code that is throwing errors) so that your project's R
-file can be generated properly. The error in the manifest should go away afterwards.
Upvotes: 1