Greendroid or ActionbarSherlock - setup

2019-02-20 13:19发布

问题:

do you guys know any tutorial on how to use one of the above frameworks in eclipse on windows? I've downloaded both of them and followed the instructions - but I still get errors in both cases. Frustratin.

回答1:

I just tried these instructions on ActionBarSherlock, but I'm pretty sure the process was the same when I was using GreenDroid.

  1. Download the .zip/.tgz and extract it somewhere
  2. Go to eclipse and choose File->New->Project
  3. Choose Android Project
  4. Select Create project from existing source and then browse to the library folder inside the folder you just extracted the .zip/.tgz into
  5. Build Target should be 3.2 as of this time
  6. Finish the wizard, then right click on the newly created project and go to properties
  7. Under the Android heading, you should see a section for Library with a checkbox IsLibrary. Make sure that's checked.
  8. Now go to the properties for your Android project, then under the Android heading and the Library section choose Add...
  9. You should see the actionbarsherlock library, add this to your project
  10. Lastly, if you were using the compatibility support you need to delete that jar since it's included in ActionBarSherlock


回答2:

I had errors on @Override methods because I was using Java 1.5. Switching to 1.6 solved them.

To do this : right click on your project > Properties > Java Compiler > Enable project specific settings > Compiler compliance level > 1.6

It is related to this issue in the project's bug tracker : https://github.com/JakeWharton/ActionBarSherlock/issues/28