Jul 13, 2011

Android: “Path for project must have only one segment”

If you find this message when you are launching the Android application, the Eclipse cannot find the path to the project.
Path for project must have only one segment.
You have to specify the Project name for the Launch configuration.

Refference:
Stackoverflow.com, Android: “Path for project must have only one segment”

Jul 4, 2011

repo init throws import readline error

While I was attempting to use the repo init command for downloading Android source code, it threw an error about importing the readline module like this:
Traceback (most recent call last):
File "/Users/xxx/bin/repo", line 91, in <module> import readline
ImportError: No module named readline
I found the same problem on Issue 1032 of Android open source project.

This happend because the python readline module was not included as part of OSX. To fix this problem, you have to install the python readline module.
sudo port install py25-readline
If you are using Python that is contained in OSX, you have to change it to MacPort's Python.
sudo port select python python25
I am using Mac OS X as a UNIX with better UI. I like Mac OS BUT Mac OS X has a lot of problem for programming environment as I mentioned before ><

Jul 3, 2011

compile problem because of an expired debug certificate

When I was compiling my Android app, I couldn't do it. I found this message in Problem view.
Error generating final archive: Debug certificate expired on XXX
I found same problem in android web site. According to the site, the Android build tools local debug key but it is already expired. To fix this problem, I had to regenerate my debug key.

Here is the step.
  1. delete the debug keystore/key already generated by the Android build tools. Specifically, delete the debug.keystore file. On Linux/Mac OSX, the file is stored in~/.android. On Windows XP, the file is stored in C:\Documents and Settings\<user>\.android. On Windows Vista, the file is stored in C:\Users\<user>\.android
  2. generate new debug keysore file with this command: keytool -genkey -v -keystore <PATH_TO_FILE>/debug.keystore -alias androiddebugkey -keyalg RSA -validity 10000 -dname "CN=Android Debug,O=Android,C=US"
Note: <PATH_TO_FILE> is a path to the debug keystore file. Please set appropriate path for your environment.