メンチカツには醤油でしょ!!

AWS/Java/Node.js/Spreadsheets/Docker/Jenkins/コミュニティ・勉強会レポを主とした技術系ブログ

Xamarin Studioのインストールでエラー

インストール中にエラー

買って間もないMacにXamarinをインストールしようとしたらこんなエラーが
f:id:ryoichi0102:20170123203405j:plain

正直新規マシンでこれが出ると結構諦めモード入りやすいです^^;

エラー内容

Xamarin Manual Installtion Instructions

An error has occured.
Please follow the steps outlined below in order to install the missing software

It was not possible to complete an automatic installation. This might be due to a problem with your network, proxy servers or an unsolvable installation conflict. At this point, you can continue the installation by manually downloading and installing the independent pieces. The list below shows each component that you need to install.

Android SDK

Download the Android SDK for Mac OS X version 24.4.1, open the downloaded archive and copy the contents of the folder found at its root directory (most probably named android-sdk-macosx) to the /Users/my-user-name/Library/Developer/Xamarin/android-sdk-macosx directory.

Click here in order to start the Android SDK Manager application. In the GUI make sure the following components are installed or selected for installation:

Android SDK Tools
Android SDK Platform-tools
Android SDK Build-tools
Android API 23
Once all the required components are selected (you can select others as well, if you wish) start the installation.

If you cannot see /Users/my-user-name/Library/Developer/Xamarin/android-sdk-macosx in Finder please click here to reveal the directory in Finder.

Download the Android NDK for Mac OS X version r10e, open the downloaded archive and copy the contents of its root directory (most probably named android-ndk-r10e) to the /Users/my-user-name/Library/Developer/Xamarin/android-ndk directory.

When the Android SDK installation is finished you might want to start the Android Emulator Manager and create as many emulator images as you might need for your development. This step can be performed at any time, on an as-needed basis.

Xamarin Studio

Download the Xamarin Studio v6.1.4 archive to any directory on your disk, double-click it and then drag and drop the Xamarin Studio icon to the Applications folder.

Xamarin.Android

Download the Xamarin.Android v7.0.2 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.

Xamarin.iOS

Download the Xamarin.iOS v10.3.1 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.

This might be due to a problem with your network

とエラーメッセージにはあるので
複数のインターネット接続環境から試したのですが、ダメでした。

助け舟が

つぶやいた(ぼやいた?)ところ、助言を頂きました。
ありがとうございます!

Android SDKをインストール

ということで、Android SDKをインストールします。

ちなみにXamarin InstallerではXamarin.Androidコンポーネントを選択するとDependenciesにAndroid SDKが追加でチェックが入っているのですが、これがどうもうまく入らないということでしょうか。
(Installerのプログレスを見ていた限りだと、Android SDK含めて数GBはDLされていたのでこれもちょっと不思議な所ですが)

手動ダウンロード&配置

下記のダウンロードサイトへ行き、コマンドラインツールの方を手動ダウンロードして解凍します。
記載時点では tools_r25.2.3-macosx.zip です。
(バージョンってエラーメッセージの24.4.1に合わせた方がいいんですかね?私は入手できる最新版の25.2.3を入れました)

developer.android.com

解凍して得られたファイルをXamarin Installerのウィザートの途中で出てくる
/Users/my-user-name/Library/Developer/Xamarin/android-sdk-macosx
に配置すればOKです。
(このディレクトリはインストールに一度はコケていれば存在すると思います。
LibraryはFinderからは通常は表示されないので⌘ + Shift + Gでアドレス入力します。)

 

f:id:ryoichi0102:20170123204200j:plain

f:id:ryoichi0102:20170123204207j:plain

f:id:ryoichi0102:20170123204214j:plain

f:id:ryoichi0102:20170123204220j:plain

 

無事にインストールが完了しました!