很早就尝试了移动开发,曾用Android studio学习了一下.
一直没有开发的动能. vs2017开始直接可以Xamarin进行移动开发,开始尝试一下.
什么是Xamarin?Xamarin
With a C#-shared codebase, developers can use Xamarin tools to write native Android, iOS, 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手机
