Thursday 24 September 2015

HOUSEKEEPING;GETTING XAMARIN AND SETTING THINGS UP

Now that you've read all that chatter online about all the trade-offs of Web,Hybrid and Native cross-platform mobile app development am happy that you finally made that important decision i favor of Xamrin.

We're going to start off with a little house-keeping here;

  1. Let's register ourselves here and get Xamarin for Students from here.
  2. Great,go ahead and give your details.
  3. You'll be expected to prove that you're a student-a student email address will suffice for the most part coupled with your student ID or other evidence you may have.
  4. Once that is done you'll receive an email confirmation and links to download the latest version of Xamarin. You'll get an online installer which will download and set everything up for you.But,if your internet is as bad as mine normally is,do request for an offline installer for your OS-in my case I'm using a Windows 10 PC-7/8/8.1 still works.
  5. Once your download is complete,launch Xamarin and select the "Options" tab-however note that it'll ask you to login,do so with your Xamarin credentials.
  6. Now,hover over to the "Options" tab and click on it.

 

Now that is a good sign, but we're not out of the woods yet;

We have some other things to set up.
  1. If you love Visual Studio-like I do, Xamarin will seamlessly integrate with Visual Studio allowing you {Windows users} to use the environment you're most comfortable with
  2. We also need to ensure we can access Xamarin Component store and Nuget;now if your not accessing internet via a proxy server then you can skip this step and move on,else you need to listen good.Go to your environment settings(-Windows users) by typing "env",and "Choose edit system environment variables".Click on the "Environment Variables" button.
  3. In the new window,under "System Variable" click on "New" and create a variable by the name "http_proxy" -without the quotes -in the "Variable name" field and insert you proxy address in the "Variable value" field.Do the same for a new variable "https_proxy";for the most part the addresses are the same.I had to bring this up because it's an issue I had faced.
  4. Now we set up the emulators.You can get emulators from Google,that ships with Android SDK,you can get Xamarin Android Player form here  ,use Genymotion,or use Visual Studio Android Emulators from here.Do note that when you'll be using Genymotion or Xamarin Android Player,Oracle Virtual Box will need to be on and apparently,Virtual Box and Hyper-V do not play well.What I mean is you won't run Virtual Box when Hyper-V is enabled.You may use to stock Google Android Emulators or Visual Studio emulators(-creates virtual Android machine in Hyper-V).
  5. You're pretty much set to go.
Issues you may face(-Windows users);

Issue:You can not access internet when you install Hyper-V powered emulators
Fix: Delete all virtual switches,uninstall all network drivers(works in windows 10),and run the following commands as admin


  • netsh int ip reset reset.txt
  • netsh winsock reset
  • netsh advfirewall reset


Then reboot.

Issue:You can not access Component Store or Nuget.
Fix: Check if your proxy changed and reset them in the environment variable settings.

Issue:You can not run an emulator.
Some fix:This arises from so many issues;ranging from buggy Hyper-V,to low development machine memory.
Ensure you have added you emulator set-up app to list of exceptions in firewall settings(for Visual Studio Android emulator add XDE to communicate via firewall:
"C:\Program Files (x86)\Microsoft XDE\10.0.10240.0" and select XDE-path may vary.)
If it's a memory issue,close some apps(-check if "Evented I/o for v8 javascript" is running in the background,it's very famous for this).

So let's meet in the next blog and run our Hello World App!.



No comments:

Post a Comment