Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25194] Android: Studio does not recognize currently running emulators; Always launches new emulator on Windows OS

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 5.2.0
Fix Version/sn/a
Componentsn/a
Labelsandroidlib, cb-tooling
ReporterBert Grantges
AssigneeUnknown
Created2016-03-01T06:19:36.000+0000
Updated2020-03-06T21:38:45.000+0000

Description

When trying to build an Android app using Appc Studio, Studio is always trying to open a new emulator, even if the emulator is already open. In some cases the emulator will open and successfully install, run the application - but this also fails a majority of the time seemingly related to a timeout issue. This is happening using both genymotion and Android emulators. I'll try and gather more information from the user.

Comments

  1. Kondal Kolipaka 2016-03-01

    [~ewieber] [~wluu] Are you able to see this behaviour, can you guys add your findings on this with the latest environment.
  2. Bert Grantges 2016-03-03

    Here is more info on the users environment C:\>node --version v4.2.2 C:\>java -version java version "1.8.0_71" Java(TM) SE Runtime Environment (build 1.8.0_71-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode) Genymotion Version 2.6.0 Revision 20151127-3674435 Windows 7 Enterprise, Service Pack 1 Cpu i5-3340M Ram 16 GB
  3. Bert Grantges 2016-03-03

    Here is more info on the users environment C:\>node --version v4.2.2 C:\>java -version java version "1.8.0_71" Java(TM) SE Runtime Environment (build 1.8.0_71-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode) Genymotion Version 2.6.0 Revision 20151127-3674435 Windows 7 Enterprise, Service Pack 1 Cpu i5-3340M Ram 16 GB
  4. Kondal Kolipaka 2016-03-04

    [~cng] There are 2 issues here: 1. Timeout during app launch/emulator launch 2. Opening a new emulator for every build *Timeout during build:* This is happening both in windows and mac os platforms. And this is not consistent - I tried 5 times, only once it was able to launch the emulator and installed the app. Below are the various errors which I encountered during the build, but most of the time it was timeout.
       [INFO] :   Waiting for emulator to become ready...
       [ERROR] :  Emulator failed to start in a timely manner
       The current timeout is set to 120000 ms
       You can increase this timeout by running: titanium.js config android.emulatorStartTimeout <timeout ms>
       
       [INFO] :   Emulator ready!
       [INFO] :   Installing apk: /Users/kondalkolipaka/development/workspaces/runtime-Titanium-360/productionapp/build/android/bin/productionapp.apk
       [ERROR] :  Application failed to install
       The current timeout is set to 240000 ms
       You can increase this timeout by running: titanium.js config android.appInstallTimeout <timeout ms>
       
       [INFO] :   Making sure the adb server is running
       [INFO] :   Installing apk: /Users/kondalkolipaka/development/workspaces/runtime-Titanium-360/productionapp/build/android/bin/productionapp.apk
       [ERROR] :  Failed to install apk on "emulator-5554"
       [ERROR] :  Error: INSTALL_FAILED_INVALID_URI
       
    *Android emulator issue:* In windows os, for every build new android emulator is getting launched. I could see, for every build it's assigning a new port and launching a new emulator. The interesting thing here is, even though it started a new emulator but app is getting launched in the old emulator! In mac os, I don't see this issue, same emulator is getting used for everybuild.
        Running: C:\android-sdk-win\tools\emulator.exe "-avd" "testNexus5" "-port" "5558" "-no-boot-anim" "-partition-size" "128"
       

JSON Source