问题
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.
- Download the .zip/.tgz and extract it somewhere
- Go to eclipse and choose File->New->Project
- Choose Android Project
- Select Create project from existing source and then browse to the library folder inside the folder you just extracted the .zip/.tgz into
- Build Target should be 3.2 as of this time
- Finish the wizard, then right click on the newly created project and go to properties
- Under the Android heading, you should see a section for Library with a checkbox IsLibrary. Make sure that's checked.
- Now go to the properties for your Android project, then under the Android heading and the Library section choose Add...
- You should see the actionbarsherlock library, add this to your project
- 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
来源:https://stackoverflow.com/questions/7132204/greendroid-or-actionbarsherlock-setup