C#使用Xamarin开发(1)

很早就尝试了移动开发,曾用Android studio学习了一下. 

一直没有开发的动能. vs2017开始直接可以Xamarin进行移动开发,开始尝试一下.

什么是Xamarin?Xamarin

From Wikipedia, the free encyclopedia
Xamarin is a Microsoft-owned  San Francisco, California-based software company founded in May 2011 [3] by the engineers that created  Mono, [4]  Mono for Android and  MonoTouch, which are  cross-platform implementations of the  Common Language Infrastructure (CLI) and Common Language Specifications (often called Microsoft .NET).

With a C#-shared codebase, developers can use Xamarin tools to write native AndroidiOS, and Windows apps with native user interfaces and share code across multiple platforms, including Windows and macOS.[5]According to Xamarin, over 1.4 million developers were using Xamarin's products in 120 countries around the world as of April 2017.[6]

On February 24, 2016, Microsoft announced it had signed a definitive agreement to acquire Xamarin.[7]

Hello world!

.Hellow world

按Vs2017導引,順利創建一個空白Andriod項目,在畫面放入一個Button

在 MainActivity創建時:

Button helloButton = FindViewById<Button>(Resource.Id.buttonHello);
helloButton.Click += delegate { Toast.MakeText(this, "Procedimento de logon ", ToastLength.Long).Show(); };

 

.发布至模拟器

在設備管理中,增加一個模擬手機.第一次啟動與真機一樣慢.

启动后,在IIS的調試選項上看到这个ADV了

 

.发布至Android手机

我是華為手機,連到電腦,在設置中,打開關于手機,在型號處連擊五下,進入開發者模式.

在設置中,打開開發者選項,打開調試模式.

電腦順利認到,還是相當方便

重新打開iis,在調試選項上看到世界名牌華為了.click 运行.手机正常下载安装.

click button.正确的回应

太棒了

 

.发布到Ios手机

 

转载于:https://www.cnblogs.com/springlee/p/7656584.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值