Michael Ribbons
Michael Ribbons

Reputation: 2005

xamarin.android - Resource.Designer errors after installing Android Studio

I installed Android Studio on the same PC as Xamarin. I wanted to use the same adb as Visual Studio in Android Studio.

(android-sdk path is an option on the initial install screen, but I had to use mklink to get around the fact that VS installs Android sdk at Program Files (x86) - Android Studio doesn't like non alphanumeric characters.

When I returned to Xamarin I could no longer compile, this seemed to be the main error: C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1183,2): error MSB6006: "aapt.exe" exited with code -1073741819.

Upvotes: 0

Views: 188

Answers (1)

Michael Ribbons
Michael Ribbons

Reputation: 2005

Luckily I kept a backup of this folder first, and reverting it did help

c:\Program Files (x86)\Android\android-sdk

Others might need to reinstall Xamarin after deleting / renaming android-sdk folder.

In addition to reverting this file I also had to clear the contents of

MyProject\MyProject.Droid\Resources\Resource.Designer.cs

This file isn't visible in VS, but you can get to it if there are errors to click on.

Don't forget to clean before build.

Upvotes: 0

Related Questions