Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23883] Android: Emulators created in Android Studio do not work

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2019-09-19T20:57:52.000+0000
Affected Version/sRelease 5.4.0
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, cli, emulator
ReporterHans Knöchel
AssigneeUnknown
Created2016-09-09T17:27:43.000+0000
Updated2019-09-19T20:57:52.000+0000

Description

Android emulators that are created with Android Studio are not being recognized correctly. Because the Android Studio provides pretty fast emulators since a while, we might want to fix this issue. Steps to reproduce: 1. Create a new emulator through Android Studio (e.g. Nexus 5, API level 23) 2. Check your environment with appc ti info 3. Note the android warning (also typo in "Uknown"):
  The Android emulator "Nexus_5_API_23" has a problem:
     Uknown error
4. Run a new android-project with appc run -p android Expected behavior: The CLI finds the Android emulator, starts the app Actual behavior: An error log is thrown:
[ERROR] Unable to find any emulators

Please create an Android emulator, then try again.
I'm not sure if we ever supported the simulators from Android Studio, but I'm pretty sure we did in the past. And since Genymotion is not licensed for free non-private projects anymore, supporting the "official one" should be a good reason to check this issue. Thanks! Full log:
Hans-Macbook-Pro:hyperloop-examples hknoechel$ appc run -p android
Appcelerator Command-Line Interface, version 5.4.0
Copyright (c) 2014-2016, Appcelerator, Inc.  All Rights Reserved.

[INFO]  tiapp.xml <sdk-version> set to 5.4.0.GA, but current Titanium SDK set to 5.5.0.v20160904203801
[INFO]  Forking correct SDK command: "/usr/local/bin/node" "/Users/hknoechel/.appcelerator/install/5.4.0/package/node_modules/titanium/lib/titanium.js" "build" "--sdk" "5.4.0.GA" "--no-banner" "--config-file" "/var/folders/s_/lmtv34b926j0m22fx95ppz980000gq/T/build-1473442005789.json" "--platform" "android" "--project-dir" "/Users/hknoechel/Documents/Apps/hyperloop-examples" "--log-level" "info" "--android-sdk" "/opt/android-sdk" "--target" "emulator"

[ERROR] Unable to find any emulators

Please create an Android emulator, then try again.

Comments

  1. Chee Kiat Ng 2016-09-13

    I think you have to create emulators in the android console and not android studio for it to work well with appc. [~msamah][~gmathews] can you verify this? If so, we probably should update our guide and say that you have to create emulators using android.
  2. Ashraf Abu 2016-09-14

    Both manage the AVD (Android Virtual Devices) from the same place. It should work. I myself use only Android emulators. I do not use Genymotion. Thus, it's probably some configuration issues or environment.
  3. Gary Mathews 2016-09-14

    I cannot reproduce this on Windows, emulators created by both AVD and Android Studio are found by the CLI and launch correctly. I will try on OSX.

JSON Source