因为jfeinstein10的这个SlidingMenu信赖ActionBarSherlock,所有先得下载ActionBarSherlock,
1.下载ActionBarSherlock,并完成配置.
Setp 1:下载ActionBarSherlock源代码
git clone git://github.com/JakeWharton/ActionBarSherlock.gitSetp 2:将ActionBarSherlock的Lib导入Eclipse
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>actionbarsherlock</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>com.android.ide.eclipse.adt.ApkBuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>com.android.ide.eclipse.adt.AndroidNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>再修改.classpath文件:
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="gen"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> <classpathentry kind="lib" path="libs/android-support-v4.jar"/> <classpathentry kind="output" path="bin/classes"/> </classpath>回到Eclipse里,Clean一下项目actionbarsherlock就可以了...
2.下载SlidingMenu,并完成配置:
Setp 1:下载SlidingMenu源代码
git clone git://github.com/jfeinstein10/SlidingMenu.git
Setp 1:配置SlidingMenu
和ActionBarSherlock的配置一样,只不过要注意的是在使用android-support-v4.jar要引用ActionBarSherlock项目下的Libs里的这个jar包,要导入的项目是SlidingMenu/library
.project与ActionBarSherlock一样,.classpath有一点点不同:
.classpath详细如下:
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> <classpathentry combineaccessrules="false" kind="src" path="/actionbarsherlock"/> <classpathentry kind="src" path="gen"/> <classpathentry kind="lib" path="/actionbarsherlock/libs/android-support-v4.jar"/> <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> <classpathentry kind="output" path="bin/classes"/> </classpath>
3.导入SlidingMenu/example项目
修改.project与上两个项目一样,配置.classpath:
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="gen"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> <classpathentry combineaccessrules="false" kind="src" path="/actionbarsherlock"/> <classpathentry combineaccessrules="false" kind="src" path="/library"/> <classpathentry kind="output" path="bin/classes"/> </classpath>这个下来项目就可以运行了...