3

I have recently updated the xamarin for android in visual studio and I am getting the following error.

Severity    Code    Description Project File    Line    Suppression State
Error       Error finding Android/Java SDKs
System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Setups\android-ndk-r12b-windows-x86_64\android-ndk-r12b\prebuilt\windows-x86_64\bin\toolchains'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.EnumerateDirectories(String path, String searchPattern)
   at Xamarin.Android.Build.Utilities.AndroidSdkBase.Initialize(String androidSdkPath, String androidNdkPath, String javaSdkPath)
   at Xamarin.Android.Build.Utilities.AndroidSdk.Refresh(String androidSdkPath, String androidNdkPath, String javaSdkPath)  App2

Can anyone help me out? Thanks.

2
  • Did you check that the path is correct? Commented Sep 19, 2016 at 10:17
  • Yes, path is correct. Commented Sep 19, 2016 at 10:22

3 Answers 3

1

A re-install of xamarin worked for me.

Sign up to request clarification or add additional context in comments.

2 Comments

How you re-install of xamarin can you tell me please?
@pArthsavadiya Just uninstall it from controlPanel -> Programs -> uninstall A Program -> Xamarin Universal Installer. And then re-install it from xamarin's site or using visual studio repair.
1

I just created a empty folder named toolchains at the specified location in error. Clean the code and rebuild.

Error got resolved.

Maybe it help somebody as it worked for me.

Comments

0

If you did an install of Xamarin, configured the NDK, then later did an upgrade to the latest VS and Xamarin, this issue seems to happen. It seems the folder path just wants to points to the root instead of the toolchains folder in more recent versions. IE..

Instead of specifying your NDK folder (as seen in your exception:

..\android-ndk-xx\prebuilt\windows-xxx_xx\bin\toolchain

After updating, specify:

..\android-ndk-xx

This solved it for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.