Skip to content

WorkManager fails to compile on version 9.4 #3343

@jschmid

Description

@jschmid

Steps to Reproduce

  1. Checkout https://github.com/jschmid/WorkManagerCompilation
  2. Try to compile

Expected Behavior

Project compiles, like on Xamarin.Android 9.3.

Actual Behavior

Compilation error:

Target _CompileJava:
    Directory "obj/Debug/android/bin/classes" doesn't exist. Skipping.
    /Users/jonas/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25/bin/javac -J-Dfile.encoding=UTF8 -d obj/Debug/android/bin/classes -classpath /Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v9.0/mono.android.jar:/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/java_runtime_fastdev.jar:obj/Debug/lp/0/jl/formsviewgroup.jar:obj/Debug/lp/1/jl/android.arch.core.common.jar:obj/Debug/lp/10/jl/bin/classes.jar:obj/Debug/lp/11/jl/com.android.support.collections.jar:obj/Debug/lp/12/jl/bin/classes.jar:obj/Debug/lp/13/jl/bin/classes.jar:obj/Debug/lp/14/jl/bin/classes.jar:obj/Debug/lp/15/jl/bin/classes.jar:obj/Debug/lp/16/jl/bin/classes.jar:obj/Debug/lp/17/jl/bin/classes.jar:obj/Debug/lp/18/jl/bin/classes.jar:obj/Debug/lp/19/jl/bin/classes.jar:obj/Debug/lp/2/jl/bin/classes.jar:obj/Debug/lp/20/jl/bin/classes.jar:obj/Debug/lp/21/jl/bin/classes.jar:obj/Debug/lp/22/jl/bin/classes.jar:obj/Debug/lp/23/jl/bin/classes.jar:obj/Debug/lp/24/jl/bin/classes.jar:obj/Debug/lp/25/jl/bin/classes.jar:obj/Debug/lp/26/jl/bin/classes.jar:obj/Debug/lp/27/jl/bin/classes.jar:obj/Debug/lp/28/jl/bin/classes.jar:obj/Debug/lp/29/jl/bin/classes.jar:obj/Debug/lp/3/jl/android.arch.lifecycle.common.jar:obj/Debug/lp/30/jl/bin/classes.jar:obj/Debug/lp/32/jl/bin/classes.jar:obj/Debug/lp/33/jl/bin/classes.jar:obj/Debug/lp/34/jl/bin/classes.jar:obj/Debug/lp/35/jl/bin/classes.jar:obj/Debug/lp/36/jl/bin/classes.jar:obj/Debug/lp/37/jl/bin/classes.jar:obj/Debug/lp/38/jl/bin/classes.jar:obj/Debug/lp/39/jl/bin/classes.jar:obj/Debug/lp/4/jl/bin/classes.jar:obj/Debug/lp/43/jl/bin/classes.jar:obj/Debug/lp/44/jl/bin/classes.jar:obj/Debug/lp/45/jl/bin/classes.jar:obj/Debug/lp/46/jl/common.jar:obj/Debug/lp/47/jl/bin/classes.jar:obj/Debug/lp/48/jl/bin/classes.jar:obj/Debug/lp/5/jl/bin/classes.jar:obj/Debug/lp/6/jl/bin/classes.jar:obj/Debug/lp/7/jl/bin/classes.jar:obj/Debug/lp/8/jl/bin/classes.jar:obj/Debug/lp/9/jl/com.android.support.support-annotations.jar -bootclasspath /Users/jonas/Library/Android/sdk/platforms/android-28/android.jar -encoding UTF-8 "@/var/folders/c8/w1k_9css1p17lw9288pp0bfw0000gn/T/tmp19026bba.tmp" 
    obj/Debug/android/src/md59c73ed0f6f0816547049fec1b3c815af/CalculatorWorker.java:4: error: cannot access ListenableFuture
    public class CalculatorWorker
           ^
      class file for com.google.common.util.concurrent.ListenableFuture not found
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    obj/Debug/android/src/md59c73ed0f6f0816547049fec1b3c815af/CalculatorWorker.java(4,8): error :  error: cannot access ListenableFuture
    obj/Debug/android/src/md59c73ed0f6f0816547049fec1b3c815af/CalculatorWorker.java(4,8): error : public class CalculatorWorker
    obj/Debug/android/src/md59c73ed0f6f0816547049fec1b3c815af/CalculatorWorker.java(4,8): error :   class file for com.google.common.util.concurrent.ListenableFuture not found
    obj/Debug/android/src/md59c73ed0f6f0816547049fec1b3c815af/CalculatorWorker.java(4,8): error : 
Done building target "_CompileJava" in project "WorkManagerCompilation.Android.csproj" -- FAILED.

Done building project "WorkManagerCompilation.Android.csproj" -- FAILED.

Build FAILED.

Version Information

From Visual Studio for Mac === Visual Studio Community 2019 for Mac ===

Version 8.1.5 (build 9)
Installation UUID: c1e57dbd-db6c-4e43-9f30-8df655acc4c6
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.6.0.25 (d16-0 / 50f75273)

Package version: 518010028

=== Mono Framework MDK ===

Runtime:
Mono 5.18.1.28 (2018-08/223ea7ef92e) (64-bit)
Package version: 518010028

=== NuGet ===

Version: 5.0.2.5988

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.2.5
2.1.8
2.1.2
2.0.5
2.0.0
SDK: /usr/local/share/dotnet/sdk/2.2.300/Sdks
SDK Versions:
2.2.300
2.2.107
2.1.504
2.1.302
2.1.4
2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Sdks

=== Xamarin.Profiler ===

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

=== Updater ===

Version: 11

=== Xamarin.Android ===

Version: 9.4.0.34 (Visual Studio Community)
Commit: xamarin-android/d16-2/7cce305
Android SDK: /Users/jonas/Library/Android/sdk
Supported Android versions:
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: 29.0.1
SDK Build Tools Version: 29.0.0 rc1

Build Information:
Mono: mono/mono@c6edaa62f94
Java.Interop: xamarin/java.interop/d16-2@b2b2610
LibZipSharp: grendello/LibZipSharp/d16-2@caa0c74
LibZip: nih-at/libzip@b95cf3f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/master@4f717b6

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/jonas/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android Device Manager ===

Version: 1.2.0.44
Hash: aac645b
Branch: remotes/origin/d16-1
Build date: 2019-05-29 19:55:24 UTC

=== Xamarin Designer ===

Version: 16.1.0.467
Hash: f1657e133
Branch: remotes/origin/d16-1-new-document-model
Build date: 2019-06-18 21:57:42 UTC

=== Apple Developer Tools ===

Xcode 10.2 (14490.120)
Build 10E125

=== Xamarin.Mac ===

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

=== Xamarin.iOS ===

Version: 12.10.0.157 (Visual Studio Community)
Hash: 6bd94753
Branch: d16-1
Build date: 2019-06-12 17:28:47-0400

=== 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: 801050009
Git revision: bd0ab28ba941b19b39322247db020dcd0fb305d0
Build date: 2019-07-03 17:15:21+00
Build branch: release-8.1
Xamarin extensions: 8cc25b5cb090e6c23b62a7901000c299977eb08d

=== Operating System ===

Mac OS X 10.14.5
Darwin 18.6.0 Darwin Kernel Version 18.6.0
Thu Apr 25 23:16:27 PDT 2019
root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

Fun stuff, if you:

  • Compile using version 9.3.0.23
  • Quit Visual Studio
  • Install 9.4.0.34
  • Open the projet and run

It will work. But that's not very practical. ¯_(ツ)_/¯

VS bug #948417

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionvs-syncFor internal use only; creates a VSTS "mirror" issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions