slider_if
slider_if

Reputation: 276

The name 'InitializeComponent' does not exist in the current context on an Android project

I'm having issues building my android app - it throws this error on all pages. Building iOS app goes fine. I tried to build this project on windows and got the same error. Unfortunately I don't remember what caused it.

What can cause this error?

Upvotes: 0

Views: 1043

Answers (1)

Adam
Adam

Reputation: 16199

The only thing that I am aware of that can cause this error is the Android project not being able to find the InitializeComponent method. VS 2015 has a lot of intellisense issues around this but it doesn't stop you from building.

Also it might be working on iOS because your only running an old version of the code for iOS.

I would try the following

  1. Make sure you have Xamarin.Forms installed
  2. If you do reinstall all your NuGet packages. You can type this in the Package Manager Console

update-package -project enter_project_name -reinstall

  1. Make sure you don't have any errors in your references.

Upvotes: 2

Related Questions