Error compiling Xamarin.Forms project

Asked

Viewed 293 times

0

I’m making that mistake:

The "Xamlctask" task was not instantiated "C: Labs FCM-Xamarin-Forms-master FCM Packages Xamarin.Forms. 2.2.0.45 build Portable-win+net45+wp80+win81+wpa81+Monoandroid10+Monotouch10+Xamarin.iOS10 Xamarin.Forms.Build.Tasks.dll". Unable to load file or Assembly 'Xamarin.Forms.Build.Tasks, Version=0.0.0.0, Culture=neutral, Publickeytoken=null' or one of its dependencies. Operation without support. (HRESULT exception: 0x80131515) FCM

This happened yesterday, when I downloaded the project. I tried and nothing. This morning, I went to try to run and it worked. Well, I created the project in Firebase and when I went to run again, the message came. I didn’t touch anything, not when it worked, not now, not the way I did. This project has several classes and I will post the Mainactivity class of Droid:

[Activity(Label = "FCM", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
    {
        static MainActivity instance = null;

        // Return the current activity instance.
        public static MainActivity CurrentActivity
        {
            get
            {
                return instance;
            }
        }
        protected override void OnCreate(Bundle bundle)
        {
            instance = this;
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());

            try
            {
                // Check to ensure everything's set up right
                GcmClient.CheckDevice(this);
                GcmClient.CheckManifest(this);

                // Register for push notifications
                System.Diagnostics.Debug.WriteLine("Registering...");
                GcmClient.Register(this, PushHandlerBroadcastReceiver.SENDER_IDS);
            }
            catch (Java.Net.MalformedURLException)
            {
                CreateAndShowDialog("There was an error creating the client. Verify the URL.", "Error");
            }
            catch (Exception e)
            {
                CreateAndShowDialog(e.Message, "Error");
            }
        }

        private void CreateAndShowDialog(String message, String title)
        {
            AlertDialog.Builder builder = new AlertDialog.Builder(this);

            builder.SetMessage(message);
            builder.SetTitle(title);
            builder.Create().Show();
        }
    }

Any help in solving this case is welcome.

  • Attempts: I tried to manually add this reference, but it gave other problems. I removed and left as it should be.

  • There are updates to make of the packages, but I can’t due to the error.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.