puko
puko

Reputation: 2980

Xamarin UI test

I am trying to run a simple Xamarin UI test. I have already set ANDROID_HOME variable but test still throw exception (see image). I am using Microsoft Visual Studio Professional 2019 Version 16.8.1. Path of my android sdk is C:\Program Files (x86)\Android\android-sdk. I have installed platfroms since 25...

SDK not found

enter image description here

EDIT I made changes in user variables (add also a JAVA_HOME variable). Still not work. (see image).

enter image description here

enter image description here

EDIT 2 RESOLVED The problem was that i have multiple paths in ANDROID_HOME variable (as Cheesebaron mentioned in the comments). There is a variable in System variables called "Path" (which i didn't notice) that you need to modified and add %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools. In the same way you have to add JAVA_HOME variable (as in Junior Jiang answer).

Upvotes: 0

Views: 145

Answers (1)

Junior Jiang
Junior Jiang

Reputation: 12723

If you are using visual stuido in PC.

First, you need to add ANDROID_HOME in User variables:

enter image description here

Second, also need to add following path inside Path:

enter image description here

Last, save changed and close visual studio to reopen it to check whether it works.

======================update======================

Have a try add JAVA_HOME in User variables:

enter image description here

and add following path inside Path:

enter image description here

Upvotes: 1

Related Questions