Visual Studio for Mac crashes when building an Android Project (fatal error).

When I try to compile my Android project the IDE shows the following alert message, then it closes itself (without clicking the OK button). It happens either when I build for Debug or Release.

A fatal error has occurred
Details of this error have been automatically sent to Microsoft for analysis. Visual Studio will now close.
OK

Active Runtime: Mono 4.8.1 (the SQLite package does not work with the current Mono Runtime v5)
Options -> Build -> General -> Target framework: Android 7.1 Nougat
Options -> Build -> Android Application -> Minimum Android version: Override - Android 4.0 (API level 14)
Options -> Build -> Android Application -> Target Android version: Override - Android 7.1 (API level 25)

Linker: Don't Link (Debug) / SDK Assemblies Only (Release)
Supported ABIs: armeabi-v7a

IDE Details:

Visual Studio Community 2017 for Mac
Version 7.5 (build 1254)
Installation UUID: 8fbd2e42-6a70-4878-b267-e7b22af25c7f
Runtime:
    Mono 5.10.1.47 (2017-12/8eb8f7d5e74) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)
    Xamarin.Mac 4.4.0.36 (master / 0c7c49a6)

    Package version: 510010047

NuGet
Version: 4.3.1.4445

.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
    2.0.5
    2.0.0
SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks
SDK Versions:
    2.1.4
    2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks

Xamarin.Profiler
Version: 1.6.2
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 9.3 (14154)
Build 9E145

Xamarin.Mac
Version: 4.4.1.176 (Visual Studio Community)

Xamarin.Android
Version: 8.3.0.19 (Visual Studio Community)
Android SDK: /Users/tg-dev-03/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
        2.3   (API level 10)
        4.0.3 (API level 15)
        4.1   (API level 16)
        4.2   (API level 17)
        4.3   (API level 18)
        4.4   (API level 19)
        5.0   (API level 21)
        5.1   (API level 22)
        6.0   (API level 23)
        7.0   (API level 24)
        7.1   (API level 25)
        8.0   (API level 26)
        8.1   (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 27.0.3

Java SDK: /usr
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin.iOS
Version: 11.10.1.177 (Visual Studio Community)
Hash: 7e782c1e
Branch: d15-7
Build date: 2018-04-25 15:27:13-0400

Xamarin Inspector
Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1

Build Information
Release ID: 705001254
Git revision: 498923ea36d2c7fe440c4e4b8cfb75bd50bbd748
Build date: 2018-05-05 10:35:24-04
Xamarin addins: 219f1c4943b4693b837b4173dd10ea982a47c852
Build lane: monodevelop-lion-d15-7

Operating System
Mac OS X 10.13.4
Darwin 17.5.0 Darwin Kernel Version 17.5.0
    Fri Apr 13 19:32:32 PDT 2018
    root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64

Enabled user installed addins
DeepClean 1.2.2
Internet of Things (IoT) development (Preview) 7.1

Posts

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    GitHub issues cross-reference

    https://github.com/xamarin/xamarin-android/issues/1674

    This cross-reference is based on an excerpt from the attached log file:

    // at  <0xffffffff>
    // at Xamarin.Tools.Zip.Native.zip_open (string,Xamarin.Tools.Zip.OpenFlags,Xamarin.Tools.Zip.ErrorCode&) [0x00001] in <0733d002219547e7af60b6fb41716161>:0
    // at Xamarin.Tools.Zip.ZipArchive.Open (string,Xamarin.Tools.Zip.OpenFlags) [0x0000e] in <0733d002219547e7af60b6fb41716161>:0
    // at Xamarin.Tools.Zip.ZipArchive.Open (string,System.IO.FileMode,string,bool,Xamarin.Tools.Zip.IPlatformOptions) [0x0005d] in <0733d002219547e7af60b6fb41716161>:0
    // at Xamarin.Android.Tools.Files.ReadZipFile (string,bool) [0x00005] in :0
    // at Xamarin.Android.Tools.Files.HashZip (string) [0x0002d] in :0
    // at Xamarin.Android.Tools.Files.HasZipChanged (string,string,string&) [0x0000f] in :0
    // at Xamarin.Android.Tools.Files.CopyIfZipChanged (string,string) [0x00004] in :0
    // at Xamarin.Android.Tasks.MonoAndroidHelper.CopyIfZipChanged (string,string) [0x00002] in :0
    // at Xamarin.Android.Tasks.Aapt.ExecuteForAbi (string,string) [0x000a4] in :0
    // at Xamarin.Android.Tasks.Aapt.ProcessManifest (Microsoft.Build.Framework.ITaskItem) [0x0018b] in :0
  • EricKinoshitaEricKinoshita BRMember ✭✭

    It seems unable to compile Android Class Library projects. I created an empty project of this type and the Visual Studio crashed as well. msbuild also failed with the same exception.

  • EricKinoshitaEricKinoshita BRMember ✭✭
    edited May 2018

    I fixed this issue downgrading Xamarin.Android. Now I can compile Android Class Libraries again.

    These are the commands I ran on OSX terminal:

    $ cd /Library/Frameworks/Xamarin.Android.framework/Versions
    $ ls
    ...
    8.2.0-15/
    8.2.0-16/
    8.3.0-19/
    [email protected] -> 8.3.0-19
    $ sudo rm Current
    $ sudo ln -s 8.2.0-16 Current
    
Sign In or Register to comment.