Xamarin Forms Deployment failed - xamarin

I'm working on Xamarin Forms application in Visual studio 2017 .I wanted to deploy application to android simulator .I try to deploy it debug mode.
i set android project as the startup project
When i deploying i get this warning
No Address and User has been specified in order to establish a connection to a Mac Server, so only the main assembly was compiled for project CMI.IOSApp. Connect to a Mac Server and try again to build the full application.

Go to VS menu Build->Configuration Manager is iOS project tick when you have set your android project as start up project.
So the Build and Deploy checkbox for iOS project should be untick when you are going for Android build.

Related

Xamarin android hangs on start

Using visual studio 15.7.4
Xamarin 4.10.10.2
Xamarin forms project
compile version api level 26
target android version api level 26
release mode
sdk link assemblies only
using Xamarin forms 3.1.0
Issue:
app starts fine (although long startup time) in debug mode. After installed to 2 different real phones the app splash screen shows on launch but hangs indefinitely
The solution for me was to enable "Zipalign" on the "Signing and aligning APK file(s)" task in my Xamarin Android build definition on Azure Devops (previously VSTS). I got the answer from here
This turned out to be something with the build definition in VSTS, as it worked when built right from Visual Studio

Xamarin.Android apk crashes after building on visualstudioonline

We got a Xamarin.Android project and are using visualstudioonline for building our app. When I build locally with my IDE (Visual Studio 2015) the app works as expected in Debug and also in Release mode. I tried to deploy the app directly from Visual Studio (Run) and also to grab the .apk file after a build from the bin directory. Everything works.
Now when I build the app with the build server on visualstudioonline the app instantly crashes when I launch the app on a device. Ive got another app on visualstudioonline with the same settings in my build task and there is no such problem (latest MSBuild version and JDK 8)
I only have the log from logcat because I also get no events, exceptions or crash reports on AppCenter.
The app in the log is called "preon.AndroidApplication"
Logcat log - whole logcat output
Logcat log - where I think the error is located

Unable to see list of emulator devices for Xamarin Android in VS 2015

I am using VS 2015 enterprise update 3. After fresh installation, I created a new project--> cross platform tools--> Blank Xaml App(Xamarin.Forms Portable). then made Andriod project is default project from Solution explorer.
Tried select a device but none is available, altough when i open SDK Manager i can see 3 devices.
Andriod error
List of devices
Did you setup your android project as your startup project?
Werid because in your screenshot it shows your portable project as your startup project. This is how it looks like when i debug my android project.

Error in building and running Xamarin iOs application in visual studio 2015 preview

I am the newbie in Xamarin Cross Platform development. I am using Visual Studio 2015 Preview for development. I created the new solution for mobile app and it is working correct for both Droid and Windows phone. But after successful connection with iOs Build host I got the error when I build the iOs App like -
Xamarin.iOS does not support running or debugging the previous build version of your project.Please ensure your solution builds before running or debugging it.
And also when I click on View iOS Simulator I got build host error.
Error: Build version problem. it will show the build version problem.
Please tell me the solution for this.
Most common cause of those symptoms
The most likely cause of this issue is the following known bug:
https://bugzilla.xamarin.com/show_bug.cgi?id=25811
Explanation
The problem in that bug is that the Xamarin.Forms template is using a bad default setting for the iOS project in Visual Studio's configuration manager.
The configuration manager works by telling Visual Studio which projects you want to be built and/or deployed at the same time in the configuration you're using at the time.
So for example; when you build your Android project in Forms, the configuration manager makes sure that the shared project is included; otherwise it wouldn't work, or you'd have to build it separately or etc. etc. (i.e. a real pain.)
Normally, Visual Studio doesn't have a way to automatically "know" which project(s) you want to include in all your configurations; you'd have to tell it to include (some library) with (some app); etc. manually.
How to fix it
Screencast: http://www.screencast.com/t/zLoQOpEn
Go to "Build -> Configuration Manager"
Select the configuration(s) you wish to adjust, (e.g. Debug | iPhoneSimulator, Release | iPhone)
Make sure your shared library project(s) are included with the platform-specific configurations. (You can ignore the greyed-out 'Deploy' checkboxes, those are handled automatically)
Why this is a bug
So this isn't a bug in that the configuration manager isn't working correctly for iOS projects, but that the Forms template is using a bad default setting for the iOS projects when you create a new app. It should "know" to include the shared project in the iOS configurations by default.

Xamarin.Forms app will not run on Android device

Just created a Xamarin.Forms app in Xamarin Studio 5.2.1 using the Blank App (Xamarin.Forms Portable) template.
Made no code changes, built solution, attempted to run it on a connected Android device via right-click on my .Android project and choosing Run With.
Instead of deploying and starting the app, I get an error "Execution failed: Object reference not set to an instance of an object."
Has anyone run into this and figured out the problem?
Found https://bugzilla.xamarin.com/show_bug.cgi?id=21508 and inferred that no startup project set for the solution could be the cause of the exception.
Set my .Android project as startup project and all is well.

Resources