Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avd error #20

Open
ir2pid opened this issue Feb 13, 2018 · 2 comments
Open

avd error #20

ir2pid opened this issue Feb 13, 2018 · 2 comments

Comments

@ir2pid
Copy link

ir2pid commented Feb 13, 2018

my avd config file:

{
"avd_list": [
{
"avd_name": "EM1",
"create_avd_package": "system-images;android-24;google_apis;x86",
"create_avd_device": "EM1",
"create_avd_tag": "google_apis",
"create_avd_abi": "x86",
"create_avd_additional_options": "AVD_recreate_new false",
"create_avd_hardware_config_filepath": "/.android/avd/EM1.avd/config.ini",
"launch_avd_port": "2557",
"launch_avd_snapshot_filepath": "
/.android/avd/EM1.avd/config.ini/EM1_SNAPSHOT.img",
"launch_avd_launch_binary_name": "emulator2",
"launch_avd_additional_options": "-gpu on"
}
]
}

I get error:


[17:36:44]: AVD with name 'EM1' does not exist. Creating new AVD.
[17:36:44]: $ echo "no" | /Users/sdutta/Library/Android/sdk/tools/bin/avdmanager create avd --name "EM1" --package "system-images;android-24;google_apis;x86" --device "EM1" --tag google_apis --abi x86 
[17:36:45]: ▸ Error: No device found matching --device EM1.
[17:36:45]: ▸ null
+------------------+--------------------+
|             Lane Context              |
+------------------+--------------------+
| DEFAULT_PLATFORM | android            |
| PLATFORM_NAME    | android            |
| LANE_NAME        | android fastscreen |
+------------------+--------------------+
[17:36:46]: Exit status of command 'echo "no" | /Users/sdutta/Library/Android/sdk/tools/bin/avdmanager create avd --name "EM1" --package "system-images;android-24;google_apis;x86" --device "EM1" --tag google_apis --abi x86 ' was 1 instead of 0.
Error: No device found matching --device EM1.
null
@FisherKK
Copy link
Collaborator

FisherKK commented Feb 13, 2018

Hello. I don't get what EM1 device is.

Please navigate to your sdk_home location then to directory tools/bin and use avdmanager in terminal to read available devices that can be used in create_avd_device field:

$ ./avdmanager list device

I would also recommend creating your AVD via Android Studio first with config you wish to have. Then inspect it config.ini in ~/.android/avd/<your_avd_name> directory and see what value does device field has. Then use it in script!

Write if you have any more problems :)

@ir2pid
Copy link
Author

ir2pid commented Feb 14, 2018

hey, copying the .ini and cache.img file makes it work now thanks!

another thing, I start 3 emulators but the screenshots work on one, rest are idle.

attaching my json:

{
  "avd_list": [
    {
      "avd_name": "Pixel_XL_API_24",
      "create_avd_package": "system-images;android-24;google_apis;x86",
      "create_avd_device": "pixel_xl",
      "create_avd_tag": "google_apis",
      "create_avd_abi": "x86",
      "create_avd_additional_options": "",
      "create_avd_hardware_config_filepath": "/Users/xx/android/fastlane/pixel_xl.ini",
      "launch_avd_port": "",
      "launch_avd_snapshot_filepath": "/Users/sdutta/xx/fastlane/cache.img",
      "launch_avd_launch_binary_name": "emulator",
      "launch_avd_additional_options": "-gpu on"
    },
    {
      "avd_name": "Nexus_7_API_24",
      "create_avd_package": "system-images;android-24;google_apis;x86",
      "create_avd_device": "Nexus 7 2013",
      "create_avd_tag": "google_apis",
      "create_avd_abi": "x86",
      "create_avd_additional_options": "",
      "create_avd_hardware_config_filepath": "/Users/xx/android/fastlane/nexus7.ini",
      "launch_avd_port": "",
      "launch_avd_snapshot_filepath": "/Users/sdutta/xx/android/fastlane/cache.img",
      "launch_avd_launch_binary_name": "emulator",
      "launch_avd_additional_options": "-gpu on"
    },
    {
      "avd_name": "Nexus_10_API_24",
      "create_avd_package": "system-images;android-24;google_apis;x86",
      "create_avd_device": "Nexus 10",
      "create_avd_tag": "google_apis",
      "create_avd_abi": "x86",
      "create_avd_additional_options": "",
      "create_avd_hardware_config_filepath": "/Users/xx/android/fastlane/nexus10.ini",
      "launch_avd_port": "",
      "launch_avd_snapshot_filepath": "/Users/xx/android/fastlane/cache.img",
      "launch_avd_launch_binary_name": "emulator",
      "launch_avd_additional_options": "-gpu on"
    }
  ]
}

my lane:


  desc "Runs tests with AVD setup according to JSON file config with usage of other lane."
  lane :fastscreen do
      automated_test_emulator_run(
        AVD_recreate_new:false,
        AVD_clean_after:false,
        AVD_setup_path: "/Users/sdutta/Workspace/mobile/skoobe-app/platform/android/fastlane/AVD_setup.json",
        shell_task:"fastlane screenshots"
      )
   end

can you help me with running screenshots on all 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants