Skip to content

Android: JAVAC : warning : [options] source value 8 is obsolete and will be removed in a future release #9925

Open
@SteveBush

Description

@SteveBush

Description

After installing latest OpenJDK and Android workload, I now get the following warning when building the default Maui template:

d:\Github\Temp>dotnet build
Restore complete (0.6s)
  Temp net9.0-ios succeeded (1.4s) → bin\Debug\net9.0-ios\iossimulator-x64\Temp.dll
  Temp net9.0-maccatalyst succeeded (1.5s) → bin\Debug\net9.0-maccatalyst\maccatalyst-x64\Temp.dll
  Temp net9.0-windows10.0.19041.0 succeeded (8.4s) → bin\Debug\net9.0-windows10.0.19041.0\win10-x64\Temp.dll
  Temp net9.0-android succeeded with 3 warning(s) (35.4s) → bin\Debug\net9.0-android\Temp.dll
    JAVAC : warning : [options] source value 8 is obsolete and will be removed in a future release
    JAVAC : warning : [options] target value 8 is obsolete and will be removed in a future release
    JAVAC : warning : [options] To suppress warnings about obsolete options, use -Xlint:-options.

Build succeeded with 3 warning(s) in 36.9s

Warnings also appear in Visual Studio.
Building with openjdk version "21.0.6" 2025-01-21 LTS
Maui Android workload: 35.0.50/9.0.100 SDK 9.0.200, VS 17.13.35828.75

Steps to Reproduce

  1. Create a new directory called Temp
  2. dotnet new maui
  3. dotnet build

Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.40 SR4

Affected platforms

Android

Affected platform versions

Android

Did you find any workaround?

No response

Relevant log output

d:\Github\NetworkVisor\Temp>dotnet workload list

Installed Workload Id      Manifest Version       Installation Source
--------------------------------------------------------------------------------
android                    35.0.50/9.0.100        SDK 9.0.200, VS 17.13.35828.75
aspire                     8.2.2/8.0.100          SDK 9.0.200, VS 17.13.35828.75
ios                        18.2.9180/9.0.100      SDK 9.0.200, VS 17.13.35828.75
maccatalyst                18.2.9180/9.0.100      SDK 9.0.200, VS 17.13.35828.75
macos                      15.2.9180/9.0.100      SDK 9.0.200, VS 17.13.35828.75
maui-windows               9.0.14/9.0.100         SDK 9.0.200, VS 17.13.35828.75
tvos                       18.2.9180/9.0.100      SDK 9.0.200, VS 17.13.35828.75
wasm-tools                 9.0.3/9.0.100          SDK 9.0.200, VS 17.13.35828.75
wasm-tools-net6            9.0.3/9.0.100          SDK 9.0.200, VS 17.13.35828.75
wasm-tools-net7            9.0.3/9.0.100          SDK 9.0.200, VS 17.13.35828.75
wasm-tools-net8            9.0.3/9.0.100          SDK 9.0.200, VS 17.13.35828.75

java -version
openjdk version "21.0.6" 2025-01-21 LTS
OpenJDK Runtime Environment Microsoft-10800203 (build 21.0.6+7-LTS)
OpenJDK 64-Bit Server VM Microsoft-10800203 (build 21.0.6+7-LTS, mixed mode, sharing)

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions