0

I've been trying to get Xamarin UI tests to pass but I cant even get them to initialize. When running the tests I get this message.

System.Exception : Android SDK not found. Please install it and if it is still not located, please set the ANDROID_HOME environment variable to point to the directory.

Searched locations: Windows Registry C:\Program Files(x86)\Android\android-sdk - Partial match. Found: zipalign, aapt, adb, android.jar Missing: apksigner [Source:ANDROID_HOME ]

What is frustrating is that the program seems to recognise that is has most of the files but it missing apksigner. But when I checked the android-sdk folder it does contain a apksigner.bat file inside the build-tools folder.

I have set the ANDROID_HOME environment in the system settings to C:\Program Files (x86)\Android\android-sdk It may be important to note that I can run the android app in the emulator just fine, but I cant get the UITest project to get it to work.

Rajan Kali
  • 12,627
  • 3
  • 25
  • 37
  • You set the `ANDROID_HOME` environment variable in correctly. Do you get the same error? Have you tried to delete the bin and obj folder to clean and rebuild or try to restart the PC? What is the error now? – Wendy Zang - MSFT Feb 08 '21 at 08:06
  • I have restarted my PC and I get the same error. Also are you saying I set my environment variable correctly? or incorrectly? Because it says I am getting a partial match found with only a single file missing. But when I checked the file is located in the correct folder. – TheBluePenguin Feb 09 '21 at 15:38
  • 1
    I get the same error. I believe it happened with latest version of Xamarin.UiTest. I target Android11, and to my knowledge they introduced a new way of signing "stuff". So Xamarin uses version 1, Android demands version 2. – raze Feb 09 '21 at 15:59
  • 1
    Had the same issue. It's caused by Xamarin.UITest 3.0.14, with 3.0.13 still works fine. Please see the answer [here](https://stackoverflow.com/questions/66031511/xamarin-uitest-3-0-14-apksigner-not-found) – Leszek L Feb 10 '21 at 17:14
  • see this: https://stackoverflow.com/questions/65047607/visual-studio-xamarin-uitest-system-exception-android-sdk-not-found-runnin/69815186#69815186 – Danimal521 Nov 02 '21 at 18:23

1 Answers1

0

Xamarin.UITest 3.0.14 is currently broken. You need to revert to 3.0.13 as described in this answer

Pebermynte Lars
  • 414
  • 3
  • 14