Error while compiling project xamarin.forms

0

I'm having this error:

  

The "XamlCTask" task was not instantiated from   "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 ".   Could not 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. (Exception from HRESULT: 0x80131515) FCM

This happened yesterday, when I downloaded the project. I tried and nothing. This morning I tried to run and it worked. Well, I created the project in Firebase and when I went to run again, the message came. I did not change anything, not when it worked and not now, I left it the way I downloaded it. This project has several classes and I'm going to post the Droid MainActivity class:

[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 to resolve this case is welcome.

    
asked by anonymous 26.09.2017 / 12:03

0 answers