locked
Inspector thinks AVD is a physical device and will not load RRS feed

  • Question

  • User354249 posted

    I'm using the Android SDK emulator with a x86 system image and VS 2017. When I try to use the latest version of the Inspector I get an error launching it; "Inspector is not supported on physical Android devices".

    I'm debugging the app fine with the emulator.

    Tuesday, December 5, 2017 12:16 PM

Answers

  • User354249 posted

    The updated version of the VS Installer switched to use the new Xamarin SDK AVD managers. SO a clean install of VS2017 and the managers solved my issue. The Google CLI managers just don't want to play ball with VS

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, March 14, 2018 5:01 PM

All replies

  • User73391 posted

    That's interesting, I haven't seen that behavior before.

    How did you start your emulator?

    If you quit the emulator and let VS start it when you begin debugging, does the error go away?

    Tuesday, December 5, 2017 3:54 PM
  • User354249 posted

    I start via cmd starting it from the android sdk directory. VS2017 recognises as soon as it starts and selects it as the default device to debug on in the toolbar

    Tuesday, December 5, 2017 3:57 PM
  • User73391 posted

    If you quit the emulator and let VS start it when you begin debugging, does the error go away?

    Tuesday, December 5, 2017 4:27 PM
  • User354249 posted

    VS does not show any google emulator AVDs in the drop down, I have to launch them from the AVD manager or cmd line

    Tuesday, December 5, 2017 4:32 PM
  • User73391 posted

    @DarrenKay that is probably the heart of the issue, then. I'll ask the VS team if they're familiar with this sort of problem.

    Tuesday, December 5, 2017 4:38 PM
  • User12817 posted

    @DarrenKay

    How are you creating the emulator? avdmanager CLI tooling? Or AVD Manager GUI tooling? Please note that Google did deprecate their AVD Manager GUI tool and the preferred method of creating AVDs is through the avdmanager CLI tooling.

    https://gist.github.com/JonDouglas/9eed5704d4601196435bf169620d3186

    I have seen a similar issue with Visual Studio if you have an old emulator created by the AVD Manager GUI and then create new emulators using the avdmanager CLI. I haven't quite pinned it down yet, but can you please try to remove all AVDs from your machine and then re-create them using avdmanager CLI or Android Studio?

    Tuesday, December 5, 2017 4:53 PM
  • User354249 posted

    I created them using the Google AVD Manager but they don't show up in VS2017 drop down.
    I can launch from the AVD Manager but use cmd line to change DNS/Proxy settings based on testing

    Tuesday, December 5, 2017 5:03 PM
  • User90290 posted

    Hi @DarrenKay

    As Jon advised, the older GUI AVD Manager is deprecated and no longer supported by Google. Using the older tooling for creating Android AVD devices can cause problems with the latest Xamarin tooling. As such we would recommend updating your Android SDK Tools to version >26.

    Please try updating your Android SDK Tools and creating the AVD over the CLI interface (or Android Studio if you have it installed) and see if the AVD appears in the list.

    Wednesday, December 6, 2017 10:34 AM
  • User354249 posted

    Used the Xamarin SDK Updater to update the Android SDK and Tools to 26 ~~but the missing the avdmanager.exe command to create a new AVD~~. Found it. I now have two versions of the emulator so not sure which one VS is set to use.

    Wednesday, December 6, 2017 12:06 PM
  • User354249 posted

    Looks like the SDK is now messed up, error trying to create an AVD

    `C:\Program Files (x86)\Android\android-sdk\tools\bin>avdmanager create avd -n HHTDevice -k "system-images;android-23;googleapis;x86"

    Warning: Observed package id 'add-ons;addon-unknown-unknown-23' in inconsistent location 'C:\Program Files (x86)\Android\android-sdk\add-ons\addon-google_apis-google-23' (Expected 'C:\Program Files (x86)\Android\android-sdk\add-ons\addon-unknown-unknown-23')

    Warning: Observed package id 'platform-tools' in inconsistent location 'C:\Program Files (x86)\Android\android-sdk\platform-tools.old976448402' (Expected 'C:\Program Files (x86)\Android\android-sdk\platform-tools')

    Warning: Already observed package id 'platform-tools' in 'C:\Program Files (x86)\Android\android-sdk\platform-tools'. Skipping duplicate at 'C:\Program Files (x86)\Android\android-sdk\platform-tools.old976448402'

    Warning: cvc-pattern-valid: Value 'default' is not facet-valid with respect to pattern 'armeabi|armeabi-v7a|arm64-v8a|x86|x8664|mips|mips64' for type 'abiType'. org.xml.sax.SAXParseException; lineNumber: 145; columnNumber: 399; cvc-pattern-valid: Value 'default' is not facet-valid with respect to pattern 'armeabi|armeabi-v7a|arm64-v8a|x86|x8664|mips|mips64' for type 'abiType'. `

    Wednesday, December 6, 2017 12:22 PM
  • User354249 posted

    I've removed the old SDK from the machine, installed the latest google command line only SDK tools. Installed a platform in SDK and updated SDK so all the tools are in place. VS 2017 recognises the new SDK tools and the SDK has installed some more platforms successfully. Try to create a new AVD;

    C:\Program Files (x86)\Android\android-sdk\tools\bin>avdmanager create avd -f -n HHTDevice -k "system-images;android-23;googleapis;x86" Warning: cvc-pattern-valid: Value '' is not facet-valid with respect to pattern '[a-zA-Z0-9-]+' for type 'idType'. org.xml.sax.SAXParseException; lineNumber: 145; columnNumber: 317; cvc-pattern-valid: Value '' is not facet-valid with respect to pattern '[a-zA-Z0-9-]+' for type 'idType'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)

    Warning: cvc-type.3.1.3: The value '' of element 'id' is not valid. org.xml.sax.SAXParseException; lineNumber: 145; columnNumber: 317; cvc-type.3.1.3: The value '' of element 'id' is not valid. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)

    Warning: cvc-pattern-valid: Value 'default' is not facet-valid with respect to pattern 'armeabi|armeabi-v7a|arm64-v8a|x86|x8664|mips|mips64' for type 'abiType'. org.xml.sax.SAXParseException; lineNumber: 145; columnNumber: 363; cvc-pattern-valid: Value 'default' is not facet-valid with respect to pattern 'armeabi|armeabi-v7a|arm64-v8a|x86|x8664|mips|mips64' for type 'abiType'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)

    Warning: cvc-type.3.1.3: The value 'default' of element 'abi' is not valid. org.xml.sax.SAXParseException; lineNumber: 145; columnNumber: 363; cvc-type.3.1.3: The value 'default' of element 'abi' is not valid. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)

    Warning: cvc-pattern-valid: Value '' is not facet-valid with respect to pattern '[a-zA-Z0-9-]+' for type 'idType'. org.xml.sax.SAXParseException; lineNumber: 145; columnNumber: 320; cvc-pattern-valid: Value '' is not facet-valid with respect to pattern '[a-zA-Z0-9-]+' for type 'idType'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)

    Warning: cvc-type.3.1.3: The value '' of element 'id' is not valid. org.xml.sax.SAXParseException; lineNumber: 145; columnNumber: 320; cvc-type.3.1.3: The value '' of element 'id' is not valid. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)

    Warning: cvc-pattern-valid: Value 'default' is not facet-valid with respect to pattern 'armeabi|armeabi-v7a|arm64-v8a|x86|x8664|mips|mips64' for type 'abiType'. org.xml.sax.SAXParseException; lineNumber: 145; columnNumber: 399; cvc-pattern-valid: Value 'default' is not facet-valid with respect to pattern 'armeabi|armeabi-v7a|arm64-v8a|x86|x8664|mips|mips64' for type 'abiType'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)

    Warning: cvc-type.3.1.3: The value 'default' of element 'abi' is not valid. org.xml.sax.SAXParseException; lineNumber: 145; columnNumber: 399; cvc-type.3.1.3: The value 'default' of element 'abi' is not valid. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)

    Auto-selecting single ABI default=======] 100% Fetch remote repository... Do you wish to create a custom hardware profile? [no] no Error: AVD not created. null

    Cannot create any AVDs now.

    Wednesday, December 6, 2017 2:34 PM
  • User354249 posted

    Cleaned off all SDK off machine Installed latest SDK via command line Installed single platform, system images and google api Created AVD from command line Emulator from command line started AVD successfully Ran VS 2017 installer to update to latest version

    VS2017 now recognises my new AVD, launches it and inspector can connect. This time I made sure I did not use the Xamarin SDK Manager and it all works as expected.

    Thursday, December 7, 2017 8:51 AM
  • User354249 posted

    And after working in VS for a few hours, I now have two SDK versions installed? The version I installed 26 and now 25, so the SDK is broken. The use of the android SDK in VS seems completely broken, I give up.

    Thursday, December 7, 2017 11:45 AM
  • User245193 posted

    Hi. I also cannot make the command line avdmanager create a new AVD. Not sure if this is totally related to OP's problem, but I'm getting this:

    `> avdmanager create avd --device 10 --name Nexus6api25 --abi googleapis/x86 --package 'system-images;android-25;google_apis;x86'

    Error: Package path is not valid. Valid system image paths are:ository...

    system-images;android-25;googleapis;x86 system-images;android-21;googleapis;x8664 system-images;android-24;googleapis;x8664 system-images;android-24;googleapis;armeabi-v7a null`

    As you can see I'm specifying a package which is listed in the valid packages list. The error message is copied verbatim, truncated words and all.. I'm also about to give up. I don't understand the need to deprecate a tool that was working and give people a broken replacement instead. Mobile development is not looking like a place I want to be in these days..

    Monday, December 18, 2017 8:57 PM
  • User354249 posted

    The updated version of the VS Installer switched to use the new Xamarin SDK AVD managers. SO a clean install of VS2017 and the managers solved my issue. The Google CLI managers just don't want to play ball with VS

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, March 14, 2018 5:01 PM