After installing the Eclipse IDE and all Android's SDK components, I tried to create my first emulator. On Windows Vista and 7, the emulator disk images are created under your user's folder (C:\Users\UserName). After setting up all the required paths, I fired Eclipse and used the AVD Manager to create my first image of a 1.5 device. The creation process ran fine but the emulator refused to start, complaining about something related to path names (ERROR: no search paths found in this AVD's configuration). Apparently the path name for the AVDs cannot have UNICODE characters like mine has (C:\Users\João Paulo). The 'ã' seems to be confusing for the SDK... The solution is to create an alternate directory for your AVDs with proper naming and use the command line to create them:
android create avd -n HVGA-3 -t 1 -p d:\android\avd\HVGA-3 --force
Life's good now.
Sunday, July 18, 2010
Tuesday, July 13, 2010
Log your applications
Looking at Log class you can see the isLoggable method.
With that you can check if the 'TAG' used in Log is loggable, so you can write something like that:
in this way you can call the Log.d() ONLY if MyTag can be debugged saving time of execution.
To 'mark' MyTag as loggable in DEBUG (default is INFO) just call in terminal:
Happy debug! ;)
With that you can check if the 'TAG' used in Log is loggable, so you can write something like that:
if (Log.isLoggable(MyTag, DEBUG)) {
Log.d(MyTag, "Debug line");
}
in this way you can call the Log.d() ONLY if MyTag can be debugged saving time of execution.
To 'mark' MyTag as loggable in DEBUG (default is INFO) just call in terminal:
adb shell setprop local.tag.MyTag DEBUG
Happy debug! ;)
Tuesday, July 6, 2010
Welcome
Welcome on the new blog dedicated to android developers!
Subscribe to:
Posts (Atom)