I have written a page in xaml. It runs smoothly without any problem on iOS but when it comes to android, An exception in thrown "Object reference not set to instance of an object " from
LoadApplication(new App());
of MainActivity.cs class.
Below is my XAML code:
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:jldoubleu" x:Class="jldoubleu.jldoubleuPage">
<AbsoluteLayout>
<Image Source="logo.png" AbsoluteLayout.LayoutBounds="0.5,0,0.6,0.4" AbsoluteLayout.LayoutFlags="All"/>
<Label HorizontalTextAlignment="Center" Text="Enrich My Group" FontSize="20" TextColor="Gray" AbsoluteLayout.LayoutBounds="0.53,0.25,0.5,0.05" AbsoluteLayout.LayoutFlags="All"/>
<Entry Placeholder="Username or Email" PlaceholderColor="Gray" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds= "0.5,0.32,0.7,0.08"/>
<Entry Placeholder="Password" PlaceholderColor="Gray" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds= "0.5,0.42,0.7,0.08"/>
<Button AbsoluteLayout.LayoutBounds="0.5,0.52,100,40" AbsoluteLayout.LayoutFlags="PositionProportional" Text="Sign in" BackgroundColor= "#4db8ff" TextColor= "White" />
<Button BackgroundColor="#00cc44" AbsoluteLayout.LayoutBounds="0.1,0.64,0.3,0.07" AbsoluteLayout.LayoutFlags="All" Text="Register" TextColor= "White" />
<Button BackgroundColor="#ff0066" AbsoluteLayout.LayoutBounds="0.8,0.64,0.5,0.07" AbsoluteLayout.LayoutFlags="All" Text="Password Reminder" TextColor= "White" />
<Button Image="fb.png" AbsoluteLayout.LayoutBounds="0.15,0.75,40,40" AbsoluteLayout.LayoutFlags="PositionProportional" BackgroundColor="Transparent" />
<Button AbsoluteLayout.LayoutBounds="0.75,0.75,0.6,0.07" AbsoluteLayout.LayoutFlags="All" TextColor="White" Text="Connect with Facebook" BackgroundColor="#0066cc"/>
<Button Image="li.png" AbsoluteLayout.LayoutBounds="0.15,0.85,40,40" AbsoluteLayout.LayoutFlags="PositionProportional" BackgroundColor="Transparent" />
<Button AbsoluteLayout.LayoutBounds="0.75,0.85,0.6,0.07" AbsoluteLayout.LayoutFlags="All" TextColor="White" Text="Connect with Linked In" BackgroundColor="#004d99" />
<Button Image="g.png" AbsoluteLayout.LayoutBounds="0.15,0.95,40,40" AbsoluteLayout.LayoutFlags="PositionProportional" BackgroundColor="Transparent" />
<Button AbsoluteLayout.LayoutBounds="0.75,0.95,0.6,0.07" AbsoluteLayout.LayoutFlags="All" TextColor="White" Text="Connect with Google" BackgroundColor="#ff1a1a" />
</AbsoluteLayout>
</ContentPage>