MAC上Xamarin使用
此为在MAC上部署安装Xamarin以及DEMO开发
一,下载安装最新版本Xcode
- the latest IOS SDK
- the latest version of Xcode
- Mac OS X 10.9
二,部署Xamarin
2.1 自动部署安装
下载地址:http://xamarin.com/download:
运行安装包后静默安装。
2.2 手动部署安装
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,配置环境检测
3.1 IOS 环境配置,其中Apple SDK的位置是指Xcode运行程序的位置;如果全部是默认安装,安装路径指向默认地址。
3.2 Android环境配置
4,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>
|
分享到:
相关推荐
mac-samples, 在OSX上,示例程序展示了如何使用 Xamarin.Mac Mac示例xamarin api开发Mac应用程序的C# 示例代码。许可证Apache许可证 2.0适用于这里存储库中的所有示例。版权所有 2011 Xamarin公司在Apache许可以证下...
Xamarin.Mac官方中文文档,非常的详细,PDF格式,手机APP开发必备的帮助文档!
2017微软技术暨生态大会召开 微软Xamarin企业跨平台移动应用的DevOps实践 若是有侵权,请通知下,本人会及时删除的
Xamarin 5.9 补丁,可进行Andorid,IOS和Mac的开发
Xamarin.Mac上实现的一个自定义的转场动画
Xamarin开发手机APP绑定数据网格。
Use the solutions provided in this book to handle common challenges in Xamarin.Forms that are encountered on a daily basis. Working examples and techniques are presented that you can modify and drop ...
[Packt Publishing] Xamarin iOS 移动应用开发 (英文版) [Packt Publishing] Xamarin Mobile Application Development for iOS (E-Book) ☆ 图书概要:☆ If you know C# and have an iOS device, learn to use ...
Xamarin Forms中文文档 Xamarin Forms中文文档 Xamarin Forms中文文档
1. Copy "mandroid.exe" to "C:\Program Files (x86)\MSBuild\Xamarin\Android" (or "C:\Program Files\MSBuild\Xamarin\Android" if you are on a 32-bit operating system) 2. Copy "mtouch.exe" to "C:\Program ...
最全Xamarin教程,完整1965页。最全Android IOS Xamarin开发指南。 Xamarin.Forms 是一个开放源代码 UI 框架。 通过 Xamarin.Forms ,开发人员可从单个共享基本代码生成 Xamarin.Android 、 Xamarin.iOS 和 Windows ...
Xamarin.Android是Xamarin的Android版本。 标签:Xamarin
xamarin android alipay bindings dll,
Xamarin 开发手册Xamarin 开发手册Xamarin 开发手册Xamarin 开发手册
Apress - Beginning Xamarin Development for the Mac.2018.pdf
Title: Mastering Xamarin UI Development Author: Steven F. Daniel Length: 388 pages Edition: 1 Language: English Publisher: Packt Publishing Publication Date: 2017-03-06 ISBN-10: 1786462001 ISBN-13: ...
Title: Xamarin Essentials Author: Mark Reynolds Length: 197 pages Edition: 1 Language: English Publisher: Packt Publishing Publication Date: 2014-12-12 ISBN-10: 178355083X ISBN-13: 9781783550838 ...
Xamarin.form实现了移动端访问Myql,并进行数据库基本的增删改。
Xamarin iOS开发实战中册
xamarin ,android的APP自动更新程序,检测版本,然后下载安装