2009年3月25日 星期三

How to install and uninstall *.apk in Android

Android Tools

@Console
(intall *.apk)
adb install myActivity.apk
(uninstall *.apk)
adb uninstall myActivity.apk

@Android
setting -> application -> manage application (選擇要解除的 application , uninstall)

2009年3月23日 星期一

Android in Eclipse takes a lot of time to run program

在 Eclipse 上開發 Android 遇到個小問題,
就是每次在 build and run 時,emulator 完成 APP 的執行基本上都要等個一兩分鐘,
解決這種沒有效率的方式就是在 Eclipse 中的 preference 選項,
選擇 Run/Debug ,一般設定下的勾都去掉,
另外再自己判斷一下有哪些子項目設定也忽略,
基本上就會節省原來 50% 的時間。

2009年3月19日 星期四

Could not find *.apk

使用 eclipse 開發 android, 測試 samples 的 HelloAndroid.
  1. create new project, create project from existing source。(eclipse's project path is “C:\workspace”, existing source is android SDK's sample\HelloAndroid)
  2. after creating, select Run As Android. But there is error message “could not find HelloAndroid.apk” , apk 是 Android Package ,類似 Java 中的 JAR,所以應是在 run time 時期找不到對應的 library
  3. 點選 project 右鍵,在 build path->configure build path,點選 Order and Export(在此設定classpth順序),將 Android Library 打勾即可正常執行。