Skip to content

"GenerateJavaStubs" task failed unexpectedly #2341

@cosminstirbu

Description

@cosminstirbu

Steps to Reproduce

This issue reproduces quite randomly, and it is among other random build / runtime issues caused by Xamarin.Android - at least when using Visual Studio 4 Mac.

This is one of the little things that makes Xamarin.Android development really painful un Visual Studio 4 Mac :(

Build FAILED.

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018: The "GenerateJavaStubs" task failed unexpectedly.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018: System.IO.FileNotFoundException: obj/Debug/android/typemap.jm.new does not exist
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018: File name: 'obj/Debug/android/typemap.jm.new'
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018:   at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x00193] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/File.cs:111 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018:   at Xamarin.Android.Tools.Files.CopyIfChanged (System.String source, System.String destination) [0x00027] in <c304dcc9c82e4174bfeded58a523ee7b>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018:   at Xamarin.Android.Tasks.GenerateJavaStubs.UpdateWhenChanged (System.String path, System.Action`1[T] generator) [0x00026] in <c304dcc9c82e4174bfeded58a523ee7b>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018:   at Xamarin.Android.Tasks.GenerateJavaStubs.WriteTypeMappings (System.Collections.Generic.List`1[T] types) [0x00073] in <c304dcc9c82e4174bfeded58a523ee7b>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018:   at Xamarin.Android.Tasks.GenerateJavaStubs.Run (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x0018c] in <c304dcc9c82e4174bfeded58a523ee7b>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018:   at Xamarin.Android.Tasks.GenerateJavaStubs.Execute () [0x0023c] in <c304dcc9c82e4174bfeded58a523ee7b>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018:   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /_/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:631 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018:   at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00212] in /_/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787 
    0 Warning(s)
    1 Error(s)

Log File

Visual Studio Enterprise 2017 for Mac
Version 7.6.9 (build 22)
Installation UUID: 1ede8c5d-9d75-419f-82a5-a4e553d2c07f
Runtime:
	Mono 5.12.0.309 (2018-02/39d89a335c8) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)

	Package version: 512000309

NuGet
Version: 4.3.1.4445

.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	2.1.2
	2.1.1
	2.0.5
	2.0.0
	1.1.2
	1.0.5
SDK: /usr/local/share/dotnet/sdk/2.1.302/Sdks
SDK Versions:
	2.1.302
	2.1.301
	2.1.4
	2.0.0
	1.0.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/Sdks

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

Apple Developer Tools
Xcode 10.0 (14320.25)
Build 10A255

Xamarin.Mac
Version: 5.0.0.0 (Visual Studio Enterprise)
Hash: b40230c0
Branch: 
Build date: 2018-09-27 11:41:37-0400

Xamarin.iOS
Version: 12.0.0.15 (Visual Studio Enterprise)
Hash: 84552a46
Branch: xcode10
Build date: 2018-09-17 21:54:33-0400

Xamarin.Android
Version: 9.0.0.20 (Visual Studio Enterprise)
Android SDK: /Users/cosminstirbu/Documents/sdk
	Supported Android versions:
		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: 28.0.0
SDK Build Tools Version: 28.0.2

Java SDK: /usr
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

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

Xamarin Inspector
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

Build Information
Release ID: 706090022
Git revision: 0a0ba3c4593e9adb1c6ff6324e641036146af376
Build date: 2018-10-05 16:38:51+00
Build branch: release-7.6
Xamarin extensions: f7856b13f2c03a58e08381d3a5970bba18f5c7d7

Operating System
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
    Thu Jun 21 22:53:14 PDT 2018
    root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

Enabled user installed extensions
AddinMaker 1.4.3
FileNesting 0.1.1
Macaque Tips 0.1.2
StyleCop Support 1.1.0.0
xUnit.NET 2 testing framework support 0.7.5
Internet of Things (IoT) development (Preview) 7.5.3

Metadata

Metadata

Assignees

Labels

need-infoIssues that need more information from the author.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions