Reputation: 21
When i run my application in the emulator for android on visual studios it works fine. When i try and run it as an installed apk on my phone, i only get a blank screen, like a content page with no UI elements not even a lable. I tried building for different API versions still the same. Even the basic xamarin.forms template, wont show any UI elements on my phone. I'm new to xamarin.forms so any help will be appreciated. here is the androidManifes.xaml code
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.app1" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" />
<application android:label="App1.Android" android:theme="@style/MainTheme" android:icon="@mipmap/icon"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
Here is my android options enter image description here
Upvotes: 0
Views: 1139
Reputation: 81
It seems to occur in some versions of xamarin when you are trying to install the signed apk in debug mode. In order to solve it change to release mode, compile the solution and install the .apk
file you will find in the android release folder.
Upvotes: 3