xamarin APK successful but it doesn't even open - xamarin

The APK is created once I tried to install the APK on the mobile devices it installs but it doesn't open in the android 6.0 and in the android 5.1 doesnt even install.
The Devices OS are
Android 5.1 -API 22
Android 6.0 - API 23
MY test device are
Android 5.1 using xamarin live player
Android Emulator 6.0
both of them works fine but when I have created the APK it doesn't even work.
This is the build information
I have also adjusted the target framework to 8.0 and 8.1 but still it doesn't work.
Output
Build Output

There must be two .APK files in your bin folder.
projectname.Droid.Apk
projectname.Droid-Signed.Apk
Use Signed one to run it on Device.

Related

Run flutter from vs code to physical phone without Android studio or emulator on windows

I started to Learn flutter toolkit need to run the app on physical phone no need to install emulator or Android studio just I install:
A)Flutter sdk and add to windows path.
B)install vs code to use as editor , just add flutter plugin to it
C) connect my physical Android phone and already work in developer mode.
The problem when I run command
Give me that my phone not connect and when run app using F5 in vs code ask for emulator I don't need that I need physical phone only.
That is flutter doctor I have any body can help me what I need to add to my PC no need Android studio no need to add any emulator.
$ flutter doctor
[√Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft
Windows [Version 10.0.17763.1158], locale ar-SA)
[XAndroid toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android
SDK components.
(or visit https://flutter.dev/setup/#android-setup for
detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[!Android Studio (not installed)
[√ VS Code (version 1.44.2)
[!Connected device
No devices available
Doctor found issues in 3 categories.
You must need android sdk to run flutter app on your android and xcode for running on iphone. Download android sdk and check again.

Android app not compatible for Android SDK built for x86

I've successfully upload android app based on xamarin forms in google play store, it shows the list of my real devices that are compatible but it also shows that all my emulators are not compatible with it. When I debug it from visual studio it runs on my emulator. Now that it's in google play I want to try it in my emulator since I don't currently have my physical device I can't install it due to compatibility. It says not compatible to Android SDK built for x86.

Xamarin.Forms - Release apk not installing

I am trying to install the application as a release APK in my android device but it is crashing when the installation of the application starts. When I run the app on release mode directly from the visual studio, it is showing no error and worked perfectly.
When the same signed APK file I am trying to install in the same or some other android device it just crashed when the installation of the application starts.
The linking property of the Android project is set to None (tried with all the three options), the minimum Android version is jelly bean and maximum version is Oreo 8.1.
I am using the latest Xamarin.Forms package and visual studio 2017. My Android SDK is updated. Please let me know what corrections do I need to make in order to successfully run the APK on all the devices.
I think these are possible things which can help you
Remove the old build from mobile and restart the mobile. while releasing, delete bin and obj folders, clean the solution and rebuild the solution after rebuilding deploy the solution
In android manifest file Set target android version to (api 27) oreo instead Use Compile using SDK.
Check the permission in release mode like (Internet, wifi and other permission which your app needs).

Why am I having trouble with the Android Emulator in VS Comm 2017?

I was having trouble using the Android emulator in Visual Studio Community 2017 and I decided to create a blank project to see if it will run. I get this error message when attempting to run it in the Live Xamarin Player:
Starting Android Emulator Android_Accelerated_x86_Nougat...
Failed to boot Android device emulator-5554...
Unable to deploy to Android_Accelerated_x86_Nougat, please ensure the Xamarin
Live Player app is open and the device is on the same network as Visual Studio.
Why would I have trouble running the emulator in a fresh blank project when I didn't even write a single line of code? Thanks for your help.
UPDATE: So I installed the latest Android SDK 8.0 along with they system image and tried to create a virtual device that uses it. But the Android Virtual Device Manager shows a, 'No system images installed' message when I selected the 8.0 framework. So I installed an earlier version of the SDK along with a system image (5) and was able to create a virtual device with it. So another question is why wouldn't the system images show up for the 8.0 framework?
The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll
(vv8.0) is greater than the $(TargetFrameworkVersion) for your project
(v7.1). You need to increase the $(TargetFrameworkVersion) for your
project
This means the Xamarin.Forms library is targeting Android 8.0 (API level 26) but your project is setup for Android 7.1 (API level 25). You can't change the Xamarin.Forms target version without downgrading, but you can change your project target version easily. You can learn more about these concepts from Xamarin. Be aware some of the details of that Xamarin blog post are already out of date!
There is another nice blog post from Xamarin which can walk you through the process of setting your system up for Android 8.0 API level 26. It's normally not this complicated, but Google changed their SDK tools internally between 25 and 26 in very major ways. They changed from GUI tools to command line tools.
You'll probably also want to get the (in preview) Xamarin Android Device Manager if you don't have a physical device to test with. This Xamarin Android Device Manager tool is the only way to create and configure API 26 and higher emulators without using the Google command line tools.
It seems as though Google has gotten rid of the GUI apps that manage the SDK and Virtual Devices in the latest version, so when you try to create a new virtual device with 8.0 it's not compatible with the GUI tools. Until Xamarin releases a GUI tool to replace them we can use the command-line to manage the SDK and virtual devices.
https://learn.microsoft.com/en-us/xamarin/android/troubleshooting/sdk-cli-tooling-changes
https://developer.android.com/studio/command-line/avdmanager.html

VST for Cordova only support API Level 19?

The requirements for the Visual Studio Tools for Apache Cordova specify that SDK for the API Level 19 must be installed. Do that means that apps created with it will only run on android KitKat devices? Any way to target older devices?
Please review the following article for reference:
https://msdn.microsoft.com/en-us/library/dn757054.aspx
Cordova targets a single SDK (currently 19 though a upcoming release will move this to 21). However this is just the SDK used to build - by default Cordova apps can be deployed on devices running API level 10 or higher (2.3.3). Unless you're creating a custom plugin that will use an API only available on Android 5.0, you won't be affected by the SDK used.
The Android tab on the config.xml designer allows you to set alternate values for what goes in "AndroidManifest.xml" file, but the build itself will always use SDK 19.
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Android 4.4.x (API level 19) is required by Visual Studio to build app or create app package targeting Android platform not for running the app. You can create Cordova app targeting device running Android released before KitKat.

Resources