1

I'm trying to implement SlidingMenu in my project ( https://github.com/jfeinstein10/SlidingMenu ). It says in the page:
In Eclipse, just import the library as an Android library project. Project > Clean to generate the binaries you need, like R.java, etc. Then, just add SlidingMenu as a dependency to your existing project and you're good to go!

I don't know what he is talking about when he tells me to import as an "Android library project" (maybe that's the error), so I just imported the project from existing code and it's full of errors because R wasn't generated. I have Eclipse set to build automatically so there was no need to clean the project but even if I do it, it still won't generate R. I already imported the support library and because of this ( Unable to resolve errors on sliding menu example with actionbarsherlock ) tried to up the minimum version required. No effect. And I'm not even trying to use Sherlock. What's going on?

Community
  • 1
  • 1
Thiago
  • 746
  • 1
  • 10
  • 22
  • Click on the Project and go to Properties, then scroll down and make sure "Is Library" is selected. If not, select it. Then try right clicking the project and selecting Android Tools -> Fix Project Properties. What are the exact errors you're getting? – Jade Byfield Jul 18 '13 at 22:44
  • Basically every reference to R is an error because there is no R and yes, "Is Library is checked" – Thiago Jul 18 '13 at 22:50
  • Right. The R.java file will not be generated if there are XML errors(which is usually the culprit), or if there are uncleared Lint Markers in the Problems tab. There must be errors somewhere. Check in the Problems tab to see what Eclipse is complaining about – Jade Byfield Jul 18 '13 at 22:52
  • 1
    It ends up the project has lots of references to Sherlock although the page makes it look like Sherlock is optional. Thanks for the tip on the Problems tab, I was just looking on logcat and the error log and they showed nothing. The app runs but any action will force close it, probably because of the scattered references to Sherlock all over. After linking it with Sherlock and deleting "support" in methods like getSupportActionBar instead of ActionBar it worked. Thanks! – Thiago Jul 18 '13 at 23:40
  • No problem Tom, glad you fixed it! – Jade Byfield Jul 18 '13 at 23:41

0 Answers0