install apk file on Android Studio AVD created with Appcelerator - solve Timeout issue

iKnow-IT banner

I discover often that the Android emulator got an timeout if you try to install your created app in Appcelerator studio.

There are several solution:

  • compile and install direcly on an connected physical device
  • compile and installing on virtual device Genymotion
  • compile and create an apk file an install this on a Virtual Device from Android Studio.

If you wan't to install on a Virtual Device from Android Studio.

First you need to create one time the virtual devices in Android Studio.

(e.g. nexus 5x with Android 6 another with Android 7.1 etc)

Tools -> Android -> AVD Manager => Create Virtual Device

 Android Virtual Devices - Android Studio

 

on the right side you can start the Android device (actions, green arrow)

If you can have created an APK file in Appcelerator Studio you can install this in this started Virtual device like:

adb install "/Users/jasper/Titanium Distribution/MyNewApp.apk"

or a re-installation:

adb install -r "/Users/jasper/Titanium Distribution/MyNewApp.apk"

The adb executable is on my mac in "~/Library/android-sdk-macosx/platform-tools" add this path to your PATH variable in your .bash_profile

Sometimes you need to install 2 times to get the proper result. has to do with adb server that needs to be restarted...

But this installation goes very quick.

An other solution: if you have started your created Virtual Device (started from Android Studio) you can also run your app from Appcelerator Studio, see the screen shot below.

Run application on Android Studio Virtual Device