1


I using Windows 10 and am trying to create a Xamarin.Forms - Blank Xaml App (Xamarin.Forms Portable) project for the first time. I have Visual Studio 2015 Enterprise Update 3 installed and have tried uninstalling, reinstalling, and repairing multiple times.

When I create a project, I get the following errors: "The name 'InitializeComponent' does not exist in the current context" "Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled" - for App, Droid, UWP, WinPhone, Windows, and iOS "The XamlCTask task failed unexpectedly..." - for UWP, WinPhone, Windows, and iOS

I tried this on my work computer and home computer and I had the same issues with both.

I have tried updating Xamarin.Forms nuget to the latest version and the created 36 errors with Droid. I also tried going to c:/users/[YOURNAME]/AppData/Local. Delete the Xamarin folder and that did not solve the issue.

I tried creating other Visual Studio projects that did not involve Xamarin and did not have any issues with those. I know the issue is with Xamarin (probably something with Android) itself, but I don't think that there is anything that I am missing from the install. I tried installing it by first installing Visual Studio, then going to Modify and adding Cross Platform. That didn't work, so I uninstalled then downloaded the Xamarin Installer. I had the same issues with both.

I created a blank Android App and that give me the warning - "aapt.exe" exited with code - 1073741849". A blank app for iPhone does not give any errors or warnings. Windows Phone does not give any errors or warnings either.

Any ideas of what I should check for so I can get this working?
Here is a picture of the error that I'm getting

1 Answer 1

0

Try updating to the latest version of Forms to get rid of the XamlC errors. Assuming you haven't updated, the template is using a modestly old version. As for the aapt error, if you have the N SDK preview installed, removing that should help. Alternatively, make certain that you have up through API 23 installed.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for the help. I updated Xamarin Forms to 2.3.0.107. There are 8 more updates for Xamarin.Android.Support that will not update because theyre not compatible with the new version of Xamarin Forms. Not sure if I need the update anyways. There are 2 warnings left now: "Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled" "Unexpected error - Please file a bug report... System.IO.FileNotFoundException...Perhaps it doesnt exist in the Mono for Android profile"
Also, when I tried to build, I got 54 errors. One that shows up a lot is "C:\Users\user\AppData\Local\Xamarin\zips\2A3A8A6D6826EF6CC653030E7D695C41.zip is not a valid zip file" also "Unzipping failed. Please download dl-ssl.google.com/android/repository/… and extract it to the C:\Users\user\AppData\Local\Xamarin\Xamarin.Android.Support.v7.CardView\23.3.0.0\content directory"
This actually seemed to work. I did the Forms update for all projects. I then uninstalled N SDK and set Use Latest Platform (Android 6.0) as the "Compile Using". I then downloaded a Android 6.0 emulator and it worked. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.