Question
Can you only create the Pixel 2 virtual device via Android Studio (v3.1.4) and not via avdmanager?
What we want to do
Use avdmanager to create a Pixel 2 device automatically (Continuous Integration script based on avdmanger). We need to use the pixel 2 device explicitly.
Problem
Executing $ANDROID_HOME/tools/bin/avdmanager list
does not return a Pixel 2 hardware profile but returns an error:
Parsing ****
Available Android Virtual Devices:
The following Android Virtual Devices could not be loaded:
Name: Pixel_2_API_28
Path: /home/user/.android/avd/Pixel_2_API_28.avd
Error: Google pixel_2 no longer exists as a device
Available devices definitions:
id: 0 or "tv_1080p"
Name: Android TV (1080p)
OEM : Google
Tag : android-tv
Additional Details
I had to execute the following command to execute the avdmanager command with JAVA 10.0.2 export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
. Else, I receive the error mentioned here: Failed to install android-sdk: "java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema"