Reputation: 1453
I setted up my Visual Studio 2017 to start developing Xamarin - Android apps, already installed Android 8.1 Oreo(API lvl. 27) and Android 8.0 Oreo(API lvl. 26) and some platform tools.
Have JAVA_HOME
pointing to C:\Program Files\Java\jdk1.8.0_221 and ANDROID_HOME
to C:\Program Files\Android\android-sdk.
I launch Visual Studio by administrator, but also tried launched ADB from cmd with administratior mode. When I try to create new virtual device with Android Device Manager launched from Visual Studio: Tools>Android>Android Device Manager..., the following message shown:
Device could not be created
Please run repair on the device, and report the issue if the problem persists. Please file an issue by choosing "Report a Problem" in the Help menu, and attach your logs. Error summary: avdmanager has returned non-zero exit code: {0}. Please check logs for more information.
I checked the logs at "C:\Users\%USER%\AppData\Roaming\XamarinDeviceManager" and it starts with this:
[19-07-21 15:48:30.07] Android Device Manager version 1.0.624.20 (1.0.624.20+7361af75d162a09d91b3af3b287c187c805161d1)
[19-07-21 15:48:30.08] Operating system: Windows 10 v10.0.17134 (Windows 10 Pro; Microsoft Windows 10 v10.0.17134 (Windows 10 Pro; 64-bit)), 64-bit
[19-07-21 15:48:30.15] [AppInfo] Detected Android SDK path: C:\Program Files\Android\android-sdk
[19-07-21 15:48:30.25] [ConfigManager] Config file path: <USER_HOME>\AppData\Local\Xamarin\AndroidDevices.exe_Url_xc3zboekagxckk4zetm2vqdih4yy0yl2\1.0.624.20\user.config
[19-07-21 15:48:30.26] [AppInfo] Set ANDROID_SDK_ROOT: C:\Program Files\Android\android-sdk
[19-07-21 15:48:30.45] --- Device Manager started
[19-07-21 15:48:31.00] [ASDKErrorLogger.BeginStep]: Updating SDK component information…
[19-07-21 15:48:31.00] No Android SDK instance matching the 'C:\Program Files\Android\android-sdk' path
[19-07-21 15:48:32.03] Xamarin manifest base URL: https://dl.xamarin.com/Manifest/d15-8/
....
I've tried a lot of things already, what could be the solution?
Upvotes: 2
Views: 3147
Reputation: 1
I eliminated that x86 directory and its contents. Then in the project I went to Tools -> Android -> Android Device manager. it brought up the device manager dialog. I clicked add new, It displayed the emulated base image with its parameters. I changed the height and eliminated functions that I would not be using, and clicked create. It showed "unzipping" and eventually returned the message System Image download error. The x86 directory is back.
Upvotes: 0