Sunday, November 7, 2010

Eclipse Tips For Android Programming

A small collection of Eclipse Android tips I found for little problems before Google Dev Day 2010 PreHackathon

Eclipse is quite slow in the default configuration. Quick tip:
edit (your eclipse dir)/opt/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini
change
-Dosgi.requiredJavaVersion=1.5
into
-Dosgi.requiredJavaVersion=1.6
http://www.inteism.com/2010/05/how-to-speed-up-eclipse-on-os-x-10-6-snow-leopard/

Eclipse Android creates the R.class file on its own. You can remove it or use Menu - Project - Clean and it will be recreated. Good idea to do this from time to time.
http://stackoverflow.com/questions/3796490/error-unable-to-open-class-file-r-java
If you get Android Packaging Problem also use Menu - Project - Clean

Make sure you have the project selected when running build all, and not some resource
http://soft-dev-pro.blogspot.com/2010/03/android-mainoutxml-error.html


Make sure you create resources before using them or you will get Error: No resource found that matches the given name
http://brainflush.wordpress.com/2009/03/15/understanding-android-themes-and-styles/

AndroidManifest Activity Name should always be kept in sync with the classname:
http://stackoverflow.com/questions/3361896/runtime-exception-in-android-junit-testing 

No comments:

Post a Comment