如何将android(gingerbread)源码导入eclipse里面

1、将.classpath文件从源码包中的/develop/ide/eclipse/.classpath复制到源码包的根目录里面

 

cd /path/to/android/root cp development/ide/eclipse/.classpath . chmod u+w .classpath
2、修改eclipse的配置文件,调整eclipse缓存大小,在eclipse根目录里面有个eclipse.ini文件,修改下面3行
-XX:MaxPermSize=256m -Xms128m -Xmx512m
3、启动eclipse,新建一个java project,设置工程路径到android源码啊包里面就ok了
上面是参考的谷歌官方文档,可以在http://source.android.com这里面找到相关的文章
另外,在源码导入完成后eclipse报了3个errors,
project 'ginger' is missing required library: 
'out/target/common/obj/JAVA_LIBRARIES/google-common-intermediates/javalib.j a 
r 
project 'ginger' is missing required library: 
'out/target/common/obj/JAVA_LIBRARIES/gsf-client-intermediates/javalib.jar 
The project cannot be built until build path errors are resolved. 
后来在网上找到的解决办法如下:
在eclipse工程栏里面右键单击工程名,在出来的菜单里面选择build path->configure build path,然后在libraries选项里面删除 
out/target/common/obj/JAVA_LIBRARIES/gsf-client-intermediates/javalib.jar 
out/target/common/obj/JAVA_LIBRARIES/google-common-intermediates/javalib.jar
这两行,添加
out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/javalib.jar这个jar包就ok了 


转载自:http://blog.csdn.net/fox_hu27/article/details/6567910

你可能感兴趣的:(eclipse,android,文档,Build,Path,library)