Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Can't debug/deploy android application

$
0
0

Hello.

I can't seem to get Xamarin forms working on android. I can run xamarin form applications on IOS in debug mode, but it will fail to debug and throw an exception when building the release version for android. Same things happen when I try running a fresh Xamarin forms project.

In debug mode, when deploying to an emulator, it will build successfully but give me "Execution Failed. Object reference not set to an instance of an object."

And when attempting to publish it as an apk it will throw

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Android.Animation.AnimatorListenerAdapter::OnAnimationPause(Android.Animation.Animator)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved.
at Xamarin.Android.Diagnostic.Error(Int32 code, String message, Object[] args)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() (MSB4018) (test.Android)

This is all with a fresh xamarin forms portable project.
I've tried to deploy to android on both OSX and Windows, but got the same problem every time.

I'm not sure what I'm doing wrong, am I missing any prerequisites or settings?

Any help will be greatly appreciated, thank you.


Viewing all articles
Browse latest Browse all 58056

Trending Articles