1,配置代码折叠插件Coffee Bytes Java
下载插件
地址:http://code.google.com/p/academic-cloud/downloads/list
具体的地址http://academic-cloud.googlecode.com/files/eclipse-folding- plugin.tar.gz
这个地址翻墙可下。
解压,放到eclipse下dropins里,
启动eclipse,Windows--Preferences--Java--Editor--Folding--Select folding to use.
应用以后,看起来是比默认的多了几个。
2,导入framework
①复制/home/senrsl/android/source/WORKING_DIRECTORY/development/ide /eclipse/.classpath到/home/senrsl/android/source/WORKING_DIRECTORY/目 录;
②修改.classpath,只保留framework需要的。
③eclipse目录下eclipse.ini加大内存
- <?xml version="1.0" encoding="UTF-8"?>
- <classpath>
- <!--classpathentry kind="src" path="packages/apps/Bluetooth/src"/>
- <classpathentry kind="src" path="packages/apps/Browser/src"/>
- <classpathentry kind="src" path="packages/apps/Calendar/src"/>
- <classpathentry kind="src" path="packages/apps/Calculator/src"/>
- <classpathentry kind="src" path="packages/apps/Camera/src"/>
- <classpathentry kind="src" path="packages/apps/CertInstaller/src"/>
- <classpathentry kind="src" path="packages/apps/Contacts/src"/>
- <classpathentry kind="src" path="packages/apps/DeskClock/src"/>
- <classpathentry kind="src" path="packages/apps/Email/src"/>
- <classpathentry kind="src" path="packages/apps/Email/emailcommon/src"/>
- <classpathentry kind="src" path="packages/apps/Exchange/src"/>
- <classpathentry kind="src" path="packages/apps/Gallery2/src"/>
- <classpathentry kind="src" path="packages/apps/Gallery2/src_pd"/>
- <classpathentry kind="src" path="packages/apps/Gallery2/gallerycommon/src"/>
- <classpathentry kind="src" path="packages/apps/HTMLViewer/src"/>
- <classpathentry kind="src" path="packages/apps/Launcher2/src"/>
- <classpathentry kind="src" path="packages/apps/Mms/src"/>
- <classpathentry kind="src" path="packages/apps/PackageInstaller/src"/>
- <classpathentry kind="src" path="packages/apps/Phone/src"/>
- <classpathentry kind="src" path="packages/apps/QuickSearchBox/src"/>
- <classpathentry kind="src" path="packages/apps/Provision/src"/>
- <classpathentry kind="src" path="packages/apps/Settings/src"/>
- <classpathentry kind="src" path="packages/apps/SoundRecorder/src"/>
- <classpathentry kind="src" path="packages/apps/Stk/src"/>
- <classpathentry kind="src" path="packages/apps/VoiceDialer/src"/>
- <classpathentry kind="src" path="packages/providers/CalendarProvider/src"/>
- <classpathentry kind="src" path="packages/providers/ContactsProvider/src"/>
- <classpathentry kind="src" path="packages/providers/DownloadProvider/src"/>
- <classpathentry kind="src" path="packages/providers/DrmProvider/src"/>
- <classpathentry kind="src" path="packages/providers/MediaProvider/src"/>
- <classpathentry kind="src" path="packages/providers/TelephonyProvider/src"/-->
- <classpathentry kind="src" path="frameworks/base/cmds/am/src"/>
- <classpathentry kind="src" path="frameworks/base/cmds/input/src"/>
- <classpathentry kind="src" path="frameworks/base/cmds/pm/src"/>
- <classpathentry kind="src" path="frameworks/base/cmds/svc/src"/>
- <classpathentry kind="src" path="frameworks/base/core/java"/>
- <classpathentry kind="src" path="frameworks/base/drm/java"/>
- <classpathentry kind="src" path="frameworks/base/graphics/java"/>
- <classpathentry kind="src" path="frameworks/base/icu4j/java"/>
- <classpathentry kind="src" path="frameworks/base/keystore/java"/>
- <classpathentry kind="src" path="frameworks/base/location/java"/>
- <classpathentry kind="src" path="frameworks/base/media/java"/>
- <classpathentry kind="src" path="frameworks/base/obex"/>
- <classpathentry kind="src" path="frameworks/base/opengl/java"/>
- <classpathentry kind="src" path="frameworks/base/packages/SettingsProvider/src"/>
- <classpathentry kind="src" path="frameworks/base/packages/SystemUI/src"/>
- <classpathentry kind="src" path="frameworks/base/policy/src"/>
- <classpathentry kind="src" path="frameworks/base/sax/java"/>
- <classpathentry kind="src" path="frameworks/base/services/java"/>
- <classpathentry kind="src" path="frameworks/base/telephony/java"/>
- <classpathentry kind="src" path="frameworks/base/test-runner/src"/>
- <classpathentry kind="src" path="frameworks/base/voip/java"/>
- <classpathentry kind="src" path="frameworks/base/wifi/java"/>
- <classpathentry kind="src" path="frameworks/ex/carousel/java"/>
- <classpathentry kind="src" path="frameworks/ex/chips/src"/>
- <classpathentry kind="src" path="frameworks/ex/common/java"/>
- <classpathentry kind="src" path="frameworks/ex/variablespeed/src"/>
- <classpathentry kind="src" path="frameworks/opt/calendar/src"/>
- <classpathentry kind="src" path="frameworks/opt/vcard/java"/>
- <classpathentry kind="src" path="frameworks/support/v13/java"/>
- <!-- classpathentry kind="src" path="development/samples/ApiDemos/src"/>
- <classpathentry kind="src" path="development/samples/ApiDemos/tests/src"/>
- <classpathentry kind="src" path="development/samples/Compass/src"/>
- <classpathentry kind="src" path="development/samples/HelloActivity/src"/>
- <classpathentry kind="src" path="development/samples/HelloActivity/tests/src"/>
- <classpathentry kind="src" path="development/samples/Home/src"/>
- <classpathentry kind="src" path="development/samples/LunarLander/src"/>
- <classpathentry kind="src" path="development/samples/LunarLander/tests/src"/>
- <classpathentry kind="src" path="development/samples/NotePad/src"/>
- <classpathentry kind="src" path="development/samples/NotePad/tests/src"/>
- <classpathentry kind="src" path="development/samples/RSSReader/src"/>
- <classpathentry kind="src" path="development/samples/SkeletonApp/src"/>
- <classpathentry kind="src" path="development/samples/SkeletonApp/tests/src"/>
- <classpathentry kind="src" path="development/samples/Snake/src"/>
- <classpathentry kind="src" path="development/samples/Snake/tests/src"/-->
- <classpathentry kind="src" path="libcore/dalvik/src/main/java"/>
- <classpathentry kind="src" path="libcore/json/src/main/java"/>
- <classpathentry kind="src" path="libcore/junit/src/main/java"/>
- <classpathentry kind="src" path="libcore/luni/src/main/java"/>
- <classpathentry kind="src" path="libcore/xml/src/main/java"/>
- <!--classpathentry kind="src" path="out/target/common/obj/APPS/ApiDemos_intermediates/src/src"/>
- <classpathentry kind="src" path="out/target/common/obj/APPS/Browser_intermediates/src/src"/>
- <classpathentry kind="src" path="out/target/common/obj/APPS/CalendarProvider_intermediates/src/src"/>
- <classpathentry kind="src" path="out/target/common/obj/APPS/ContactsProvider_intermediates/src/src"/>
- <classpathentry kind="src" path="out/target/common/obj/APPS/MediaProvider_intermediates/src/src"/>
- <classpathentry kind="src" path="out/target/common/obj/APPS/Music_intermediates/src/src"/>
- <classpathentry kind="src" path="out/target/common/obj/APPS/Phone_intermediates/src/src"/>
- <classpathentry kind="src" path="out/target/common/obj/APPS/QuickSearchBox_intermediates/src/src"/ -->
- <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/android-common-carousel_intermediates/src/renderscript/src"/>
- <!-- classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/com.android.emailcommon_intermediates/src/src"/ -->
- <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java"/>
- <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/keystore/java"/>
- <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/location/java"/>
- <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/media/java"/>
- <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/telephony/java"/>
- <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/voip/java"/>
- <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/wifi/java"/>
- <classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/services_intermediates/src"/>
- <classpathentry kind="src" path="out/target/common/R"/>
- <classpathentry kind="src" path="external/apache-http/src"/>
- <classpathentry kind="src" path="external/bouncycastle/src/main/java"/>
- <classpathentry kind="src" path="external/libphonenumber/java/src"/>
- <classpathentry kind="src" path="external/nist-sip/java"/>
- <classpathentry kind="src" path="external/tagsoup/src"/>
- <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/classes-jarjar.jar"/>
- <!-- classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/android-support-v4_intermediates/javalib.jar"/ -->
- <!--classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/google-common_intermediates/javalib.jar"/-->
- <!-- classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/gsf-client_intermediates/javalib.jar"/ -->
- <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/guava_intermediates/javalib.jar"/>
- <!-- classpathentry kind="lib" path="packages/apps/Calculator/arity-2.1.2.jar"/ -->
- <classpathentry kind="output" path="out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes"/>
- </classpath>
④eclipse,Project--Build Auto,自动编译,不要。
- -startup
- plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
- --launcher.library
- plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
- -product
- com.android.ide.eclipse.adt.package.adtproduct
- -showsplash
- org.eclipse.platform
- --launcher.XXMaxPermSize
- 256m
- --launcher.defaultAction
- openFile
- -vmargs
- -Dosgi.requiredJavaVersion=1.6
- -XX:MaxPermSize=256m
- -Xms512m
- -Xmx2048m
- -Dorg.eclipse.swt.browser.DefaultType=mozilla
⑤eclipse--File--New Java Project---填项目名,选路径,创建
等待导入。。。。
导入以后不要清理项目。。。。
⑥配置Debug运行
项目--右键--Debug As--Debug Config,选择Remote Java Application,新建
里面这个port来自于DDMS,打开DDMS,查看
就取到了8614端口,如果项目报一堆错误,不用管,直接Process是可以成功的
错误:
①导入后The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
右键项目--属性--Java Build Path,里面没JRE,加上
现在看起来,就可以用eclipse编代码了,不用再折腾wine,vim什么的了。。。。。。
那些错误怎么解决呢。。。。。
把原版的.classpath放进去,然后重新走一遍,这样就把官方默认的都导进来了。
错误看起来少了好多,才五千多个嘛!!!
2015年04月28日20:56:48
--
senRsl
2015年04月28日18:50:56
2015年04月28日18:50:56
没有评论 :
发表评论