title: Pixel 2 Emulator / Virtual Device not in AVD manager device list
body: <p><strong>Question</strong></p>
  
  <p>Can you only create the <em>Pixel 2</em> virtual device via Android Studio (v3.1.4) and not via <em>avdmanager</em>?</p>
  
  <p><strong>What we want to do</strong></p>
  
  <p>Use <em>avdmanager</em> to <em>create</em> a <em>Pixel 2</em> device automatically (Continuous Integration script based on avdmanger). We need to use the pixel 2 device explicitly.</p>
  
  <p><strong>Problem</strong></p>
  
  <p>Executing <code>$ANDROID_HOME/tools/bin/avdmanager list</code> does not return a <em>Pixel 2</em> hardware profile but returns an error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p><strong>Additional Details</strong></p>
  
  <p>I had to execute the following command to execute the avdmanager command with JAVA 10.0.2 <code>export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'</code>. Else, I receive the error mentioned here: <a href="https://stackoverflow.com/questions/46402772/failed-to-install-android-sdk-java-lang-noclassdeffounderror-javax-xml-bind-a/51644855#51644855">Failed to install android-sdk: &quot;java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema&quot;</a></p>