AzimoLabs / fastlane-plugin-automated-test-emulator-run

Plugin dedicated for Android platform. Wraps gradle task/shell command used for launching instrumented tests. Provides start of as many AVDs with various configs as needed before test run, waits for boot, kills emulators and deletes them from hdd after tests are finished or disturbed.
MIT License
113 stars 48 forks source link

AVD is not starting #19

Open philipesteiff opened 6 years ago

philipesteiff commented 6 years ago

Hello,

For any reason my emulator is not starting.

My config.json:

{
  "avd_list": [
    {

      "avd_name": "Test-Emulator-API23-Nexus-5-1",

      "create_avd_package": "system-images;android-23;google_apis;x86_64",
      "create_avd_device": "Nexus 5X",
      "create_avd_tag": "google_apis",
      "create_avd_abi": "x86_64",
      "create_avd_additional_options": "",
      "create_avd_hardware_config_filepath": "~/.android/avd/Test-Emulator-API23-Nexus-5-1.ini",

      "launch_avd_port": "",
      "launch_avd_snapshot_filepath": "~/.android/avd/Test-Emulator-API23-Nexus-5-1.avd/cache.img",
      "launch_avd_launch_binary_name": "emulator",
      "launch_avd_additional_options": "-gpu on"

    }
  ]
}

I tried to start the emulator directly using the plugin command:

Any suggestion?

sparkleci commented 6 years ago

I'm having the same problem. Do you know how to handle it?

piterwilson commented 6 years ago

For anyone having this issue, we figured it out one solution.

After this failure, we simply quit the script. Then we went and looked into the AVD Manager and payed close attention to the settings on the newly created AVD which was still in the list. That's how we realized that the emulator created only had 16MB memory heap size, while if we looked at the other emulators, we could see they had more normal values like 256MB etc ...

So, the solution was to go into the folder where the emulators are stored (CTR+CLICK / Show on Disk) and we copied the config.ini file there and used that as the parameter in create_avd_hardware_config_filepath

After that the emulator booted and things are progressing. We are still scratching our heads trying to figure out how to obtain a .img snapshot to avoid going trough the whole boot up each time. The folder where the snapshot should be doesn't have a .img file but instead is a directory with a bunch of .ini,.pb and .bin files.

Anyway i hope that helps.

RithvikSharma commented 4 years ago

Any update on the issue?