此为在MAC上部署安装Xamarin以及DEMO开发
下载地址:http://xamarin.com/download:
运行安装包后静默安装。
2.2.1 下载文件如下:
http://xamarin.com/installer_assets/v3/Mac/Universal/InstallationManifest.xml此为官方提供的下载需求列表。
根据需要mac下需要下载:(下面提供一套版本下载地址,如果需要下载最新的,点击上方列表连接)
Xamarin自动下载工具,下载的所有文件信息在mac的:/Users/电脑名/Library/Caches/XamarinInstaller/Universal/ 目录下可以查看得到。包括上面的Xamarin安装需求列表文件;
1,Mono Framework :http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-4.0.0.143.macos10.xamarin.x86.pkg
2,Java SDK:http://download.xamarin.com/Installer/MonoForAndroid/jdk-7u71-macosx-x64.dmg
3,Android SDK:http://dl.google.com/android/android-sdk_r22-macosx.zip
http://dl.google.com/android/repository/repository-10.xml
http://schemas.android.com/sdk/android/repository/10
4,Android NDK:http://dl.google.com/android/ndk/android-ndk-r10d-darwin-x86_64.bin
5,Xamarin Studio:http://download.xamarin.com/studio/Mac/XamarinStudio-5.9.0.431-0.dmg
6,Xamarin.Android:http://download.xamarin.com/MonoforAndroid/Mac/mono-android-5.1.0-115.pkg
7,Xamarin.iOS:http://download.xamarin.com/MonoTouch/Mac/monotouch-8.10.0.267.pkg
8,Xamarin.Mac:http://download.xamarin.com/XamarinforMac/Mac/xamarin.mac-2.0.0.262.pkg
9,Xamarin Android Player:http://developer.xamarin.com/guides/android/getting_started/installation/android-player/
下载链接:https://xamarin-android-player.s3.amazonaws.com/installer/Mac/Xamarin%20Android%20Player.dmg
10,VBox:http://download.virtualbox.org/virtualbox/4.3.26/VirtualBox-4.3.26-98988-OSX.dmg
2.2.2 安装步骤如下:
1,安装Mono Framework — Java JDK —安装 Xamarin Studio— 安装Xamarin.IOS— 安装Xamarin.android— 安装Xamarin.mac— 解压Android SDK 以及NDK
2.2.3 安装后查看About
Xamarin Studio Version 5.9 (build 431) Installation UUID: 97c8e49a-b04c-4431-895f-17165ebacb09 Runtime: Mono 4.0.0 ((detached/d136b79) GTK+ 2.24.23 (Raleigh theme) Package version: 400000143 Xamarin.Android Version: 5.1.0.115 (Trial Edition) Android SDK: /Users/simafei/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 2.3 (API level 10) 4.0.3 (API level 15) 4.1 (API level 16) 4.2 (API level 17) 4.3 (API level 18) 4.4 (API level 19) 5.0 (API level 21) Java SDK: /usr java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode) Xamarin Android Player Not Installed Apple Developer Tools Xcode 6.3.1 (7703) Build 6D1002 Xamarin.iOS Version: 8.10.0.267 (Trial Edition) Hash: 6481535 Branch: master Build date: 2015-04-27 04:38:13-0400 Xamarin.Mac Version: 2.0.0.262 (Starter Edition) Build Information Release ID: 509000431 Git revision: 7560726734fc7267de2fa9abed2509968deefaa8 Build date: 2015-04-17 19:25:48-04 Xamarin addins: 2e772c734ab3148054eae7bf8949f340fdeb5e5e Operating System Mac OS X 10.10.0 Darwin zhaoliangdeMini.lan 14.0.0 Darwin Kernel Version 14.0.0 Fri Sep 19 00:26:44 PDT 2014 root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64 |
3.1 IOS 环境配置,其中Apple SDK的位置是指Xcode运行程序的位置;如果全部是默认安装,安装路径指向默认地址。
3.2 Android环境配置
自动生成两个目录,AndroidTest 以及对应的AndroidTest.UITests 文件夹。Mac 下Xamarin Studio开发Android与在Window下开发Android无区别,如果需要了解Android开发,可以查看上一篇文章。
附带:
<updates> <Global> <WelcomeUrl>http://xamarin.com/welcome</WelcomeUrl> </Global> <Update> <Name>Mono Framework</Name> <Version>4.0.0</Version> <GenericName>MONO</GenericName> <Url> http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-4.0.0.143.macos10.xamarin.x86.pkg </Url> <RequiresAdminRights>true</RequiresAdminRights> <ManualInstructions> <Para> Download the<Link handler="variable" target="Url"> <Name/> v<Version/> archive </Link> 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. </Para> </ManualInstructions> </Update> <Update> <Name>Java SDK</Name> <Version>1.7</Version> <GenericName>MacJDK</GenericName> <Url>http://this.is.not/used</Url> <Url> http://download.xamarin.com/Installer/MonoForAndroid/jdk-7u71-macosx-x64.dmg </Url> <IsAppleJava>false</IsAppleJava> <RequiresAdminRights>true</RequiresAdminRights> <ManualInstructions> Mac OS X uses its own version of Java and in order to install it you need to<Link handler="exec" target="TerminalApp">start the terminal app</Link> and type the following command:<Shell>javac -version</Shell> After typing it you should see a Mac OS X system popup which will guide you to install the Java software. </ManualInstructions> </Update> <Update Long="true"> <Name>Android SDK</Name> <Version>22</Version> <GenericName>ASDK</GenericName> <Url> http://dl.google.com/android/android-sdk_r22-macosx.zip </Url> <RepositoryUrl> http://dl.google.com/android/repository/repository-10.xml </RepositoryUrl> <RepositoryNS> http://schemas.android.com/sdk/android/repository/10 </RepositoryNS> <Platforms>10,12,15,19,21</Platforms> <Samples/> <DownloadDocs>false</DownloadDocs> <ManualInstructions> <Optional if="NeedMainSDK"> <Para> Download the<Link handler="variable" target="Url"> <Name/> for Mac OS X version<Version/> </Link> , open the downloaded archive and copy the<Bold>contents</Bold> of the folder found at its root directory (most probably named<Monospace>android-sdk-macosx</Monospace> ) to the<Monospace> <TargetDir/> </Monospace> directory. </Para> </Optional> <Para> <Link handler="exec" target="SdkManager">Click here</Link> in order to start the Android SDK Manager application. In the GUI make sure the following components are installed or selected for installation:<List type="ul"> <ListItem>Android SDK Tools</ListItem> <ListItem>Android SDK Platform-tools</ListItem> <ListItem>Android SDK Build-tools</ListItem> <Repeat for="Platforms" format="csl"> <ListItem> Android API<RepeatItem/> </ListItem> </Repeat> </List> </Para> <Para> Once all the required components are selected (you can select others as well, if you wish) start the installation.<Optional if="TargetDirIsLibrary"> <Note> If you cannot see<Monospace> <TargetDir/> </Monospace> in Finder please<Link handler="file" target="TargetDir" isDir="true">click here</Link> to reveal the directory in Finder. </Note> </Optional> </Para> <Optional if="NeedNDK"> <Para> Download the<Link handler="variable" target="NDKUrl"> Android NDK for Mac OS X version<NDKVersion/> </Link> , open the downloaded archive and copy the<Bold>contents</Bold> of its root directory (most probably named<Monospace> android-ndk-<NDKVersion/> </Monospace> ) to the<Monospace> <NDKTargetDir/> </Monospace> directory. </Para> </Optional> <Para> When the<Name/> installation is finished you might want to start the<Link handler="exec" target="AvdManager">Android Emulator Manager</Link> 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. </Para> </ManualInstructions> <NDK> <Version>10</Version> <VersionTag>d</VersionTag> <Url> http://dl.google.com/android/ndk/android-ndk-r10d-darwin-x86_64.bin </Url> <TargetDir>|Personal|/Library/Developer/Xamarin/android-ndk</TargetDir> </NDK> <AVD> <Name>MonoForAndroid API 15</Name> <BasePlatform>15</BasePlatform> <SdCardSize>512</SdCardSize> <SkinName>QVGA</SkinName> <RamSize>512</RamSize> <LcdDensity>120</LcdDensity> <HeapSize>48</HeapSize> </AVD> <AVD> <Name>MonoForAndroid API 14</Name> <BasePlatform>14</BasePlatform> <SdCardSize>512</SdCardSize> <SkinName>QVGA</SkinName> <RamSize>512</RamSize> <LcdDensity>120</LcdDensity> <HeapSize>48</HeapSize> </AVD> <AVD> <Name>MonoForAndroid API 12</Name> <BasePlatform>12</BasePlatform> <SdCardSize>512</SdCardSize> <SkinName>WXGA</SkinName> <RamSize>512</RamSize> <HeapSize>48</HeapSize> <LcdDensity>160</LcdDensity> <KeyboardLid>false</KeyboardLid> </AVD> <AVD> <Name>MonoForAndroid API 10</Name> <BasePlatform>10</BasePlatform> <SdCardSize>512</SdCardSize> <SkinName>QVGA</SkinName> <RamSize>512</RamSize> <HeapSize>32</HeapSize> <LcdDensity>120</LcdDensity> </AVD> </Update> <Update> <Name>Xamarin Studio</Name> <Version>5.9.0</Version> <ReleaseId/> <GenericName>MonoDevelop</GenericName> <Url> http://download.xamarin.com/studio/Mac/XamarinStudio-5.9.0.431-0.dmg </Url> <RequiresAdminRights>false</RequiresAdminRights> <ManualInstructions> <Para> Download the<Link handler="variable" target="Url"> <Name/> v<Version/> archive </Link> to any directory on your disk, double-click it and then drag and drop the<Name/> icon to the Applications folder. </Para> </ManualInstructions> </Update> <Update Selectable="true" Long="false"> <Name>Xamarin.Android</Name> <Version>5.1.0</Version> <VersionTag/> <GenericName>XAndroid</GenericName> <DependsOn>MONO,MacJDK,ASDK,MonoDevelop</DependsOn> <Url> http://download.xamarin.com/MonoforAndroid/Mac/mono-android-5.1.0-115.pkg </Url> <RequiresAdminRights>true</RequiresAdminRights> <ManualInstructions> <Para> Download the<Link handler="variable" target="Url"> <Name/> v<Version/> archive </Link> 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. </Para> </ManualInstructions> </Update> <Update Selectable="true" Long="false"> <Name>Xamarin.iOS</Name> <Version>8.10.0.267</Version> <VersionTag/> <GenericName>XIOS</GenericName> <Url> http://download.xamarin.com/MonoTouch/Mac/monotouch-8.10.0.267.pkg </Url> <DependsOn>MONO,MonoDevelop</DependsOn> <RequiresAdminRights>true</RequiresAdminRights> <RequiresXcode>true</RequiresXcode> <ManualInstructions> <Para> Download the<Link handler="variable" target="Url"> <Name/> v<Version/> archive </Link> 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. </Para> </ManualInstructions> </Update> <Update Selectable="true" Long="false"> <Name>Xamarin.Mac</Name> <Version>2.0.0.262</Version> <GenericName>XAMMAC</GenericName> <Url> http://download.xamarin.com/XamarinforMac/Mac/xamarin.mac-2.0.0.262.pkg </Url> <DependsOn>MONO,MonoDevelop</DependsOn> <RequiresAdminRights>true</RequiresAdminRights> <RequiresXcode>true</RequiresXcode> <ManualInstructions> <Para> Download the<Link handler="variable" target="Url"> <Name/> v<Version/> archive </Link> 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. </Para> </ManualInstructions> </Update> <ManualInstructionsIntro> <Para> <Note> 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. </Note> </Para> </ManualInstructionsIntro> <ManualInstructionsStyleSheet> <![CDATA[ body { font-size: 10pt; font-family: sans-serif; color: black; } .monospace { font-family: monospace; } .executableName, .fsLocation { font-family: monospace; font-weight: bold; } .shellCode { display: block; font-family: monospace; margin-left: 5em; margin-right: 5em; margin-top: 1em; margin-bottom: 1em; padding: 0.5em; border: darkgray 1px dotted; } .note { display: block; font-size: 11pt; background-color: lightgray; color: darkred; padding: 10px; border: gray 1px solid; margin-left: 5em; margin-right: 5em; margin-top: 1em; margin-bottom: 1em; } .item { margin-top: 1em; border-top: darkgray 1px solid } .itemTitle { background-color: #eeeeee; font-size: 12pt; font-weight: bold; margin-bottom: 0.5em; } ]]> </ManualInstructionsStyleSheet> </updates> |