0

I'm trying to compile to Android using Unity3D. The normal procedure is installing Android Studio. However I want to use Visual Studio Community (Preferences -> SDK Locations -> Android) to avoid downloading Android Studio because I do not plan to use it:

screenshot

The rest of components seems to be installed well. However the Android SDK Platform-Tools installation outputs the following error:

Installing Android SDK Platform-Tools v26.0.0 failed

Could not find a part of the path "/Users/username/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/package.xml".

I have been able to install it after creating an empty folder named platform-tools manually. Unfortunately it seems it has not been installed correctly because the folder only contains one file named: package.xml of much less than 7 Mb. Unity also output the following error:

Android SDK is outdated

SDK Tools version 0.0.0 < 24.0.0.

Workarounds seem easy (both can be downloaded from here: https://developer.android.com/studio/index.html):

  • Install Android Studio: it seems the easier and quick way, but >500Mb HardDisk space
  • Install only command line tools: not so easy and quick

However I guess I'm very stubborn and curious: why could it be failing?

Community
  • 1
  • 1
chelder
  • 3,819
  • 6
  • 56
  • 90
  • this seems to be a bug, but I think we have fixed it already. Which VS Mac version are you using? It would be great if you could create a bug report at https://bugzilla.xamarin.com/enter_bug.cgi?product=Android&component=SDK%20Manager and attach your version information and logs (especially AndroidTools.*.log), so we can investigate it. thanks! – Sevo Kukol Sep 05 '17 at 22:26
  • Visual Studio for Mac Community 7.1 build 1297 @SevoKukol – chelder Sep 06 '17 at 20:20
  • Hitting the same exact problem, same build, Visual Studio for Mac Community version 7.1 build 1297. Weirdest thing. Creating the folder manually hits the same problem: installation just creates a single xml file in there. – Zeinrich Sep 06 '17 at 21:27

1 Answers1

1

Hey mate for me it worked to create the missing folder manually.

So this folder:

/Users/username/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/

Is actually missing so if you do this:

$ cd /Users/username/Library/Developer/Xamarin/android-sdk-macosx/
$ mkdir platform-tools

And try to run the installer from VS UI it should install the platform-tools package.


Complement from @benjamingranados:

Also check that the destiny folder in the "Locations" Tab is the same.

Hangarter
  • 582
  • 4
  • 12
  • 1
    This answer worked for me partially, I had also to check that the destiny folder in the "Locations" Tab was the same (in my case, the problem is that I had the location defined as an external disk that I have no more) – benjamingranados May 02 '22 at 17:34