Monday, November 28, 2011

Android Dev - How to install & uninstall apk using emulator in PC

I'm newbie in Android, but I'll share what I get..

Installing Applications With Emulator Android SDK


  1. I assume that you've installed sdk to your PC, and you've downloaded / created the apk. My recommendation is using Android 2.2  (API 8) because I've tried others and having some problems.
  2. After created your AVD, start the emulator until you see the Android home screen (usually there's a google bar)..
  3. Run your cmd, and change you directory to android-sdk/platform-tools
    ex : type "cd.." until c:\> and cd to your android-sdk folder (ex: cd DEV/android-sdk/platform-tools)
  4. Move your apk to folder platform-tools
  5. Type adb install yourAPK.apk and Enter
  6. If success, there will be yourAPK on your Emulator's menu, just open it.
  7. If you see an error that asked you to install AIR, then you have to search Runtime.apk (I got it in my flex-sdk), repeat step number 4 and install Runtime.apk
  8. If success, now you can try yourAPK application..
  9. Done

Uninstalling Applications With Emulator Android SDK

  1. This is the easy one, just Click on menu and then select settings icon >> Click on applications tab>>Go to Manage applications
  2. Select the appropriate application to uninstall, (here it is) yourAPK >> Uninstall Button will appear, click on it and follow the instructions to remove or uninstall the youAPK application. Press the menu button on the emulator and you will notice that the Sudoku application disappears from the main grid view.
  3. Done

Android Dev - How to fix "WARNING: Java not found in your path"

Do you have an error while get into android sdk manager.exe?
The error may be like :
WARNING: Java not found in your path.
Checking it it's installed in C:\Program Files\Java instead.


ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java installed on your system. We
recommend that you install the JDK version of JavaSE, available here:
  http://java.sun.com/javase/downloads/

You can find the complete Android SDK requirements here:
  http://developer.android.com/sdk/requirements.html


Ok,now I'll tell you how to fix it : (Win XP)
  • Make sure that you have installed the right type of java's jdk here : http://www.oracle.com/technetwork/indexes/downloads/index.html
  • Right Click on My Computer
  • Select Properties
  • Click Advanced tab on the right bottom section
  • Click the Environment Variables... button at the bottom of the properties dialog
  • On the bottom list (System variables) find the "Path" variable
  • Click the Edit button
  • Go to the end of the textbox and type something like c:\program files\java\jdk1.6.0_26\bin (make sure it matches the name of your java directory (java.exe)!)
  • Click OK
  • Click OK
  • Click OK
  • Done