Nov 19, 2012

Android: Running my first application on my Nexus 7

After running the android application in an emulator, it is time to install the application on a real device. If you want to install the application on your Nexus 7, you have to follow this steps:
  • put your Nexus 7 in USB debugging mode
    (Settings -> Developer Options {} -> USB debugging)
    (Android version >4.1 you have to use this instruction)
  • change USB mode to PTP
    (take a look here to do this)
  • check connectivity with adb command:
    schroff@hades:$ ./adb devices
    List of devices attached
    0XXXXXXXXXXXXX        device

    schroff@hades:$

After this: start eclipse and open your project (how to create a project look here) and change "run"->"run configurations" -> "target" to "Always prompt to pick device":
and after hitting run:
Now on the Nexus 7 the icon appeared:
and the app started like in the emulator:

No comments:

Post a Comment