-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Context
My main question: is this comment still true? Do we just need to wait for a later Flutter update?
Related issue - #156103
Steps to reproduce
- Grab Flutter 3.24.3, Android Gradle Plugin 8.7, and Android Studio Ladybug. Target Java 17.
flutter cleanflutter build apk
Tested on Windows. I'm not sure if the OS or Android Studio versions matter.
Expected results
Clean build
Actual results
3 warnings
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Code sample
Code sample
See this repo: https://github.com/EnduringBeta/flutter-bug/tree/old-java-version
app/build.gradle
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'dev.flutter.flutter-gradle-plugin'
//id 'com.google.gms.google-services'
//id 'com.google.firebase.crashlytics'
}
// If local properties file doesn't exist, use some default values if possible
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
// Update Android SDK versions here
// Android SDK levels defined here:
// https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels
def flutterCompileSdkVersion = 35
def flutterMinSdkVersion = 24 // Android 7.0
def flutterTargetSdkVersion = 35
kotlin {
jvmToolchain(17) // Java version defined here
}
android {
namespace 'com.example.flutterbug'
compileSdk flutterCompileSdkVersion
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId 'com.example.flutterbug'
minSdkVersion flutterMinSdkVersion
targetSdkVersion flutterTargetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
debug {
// This differentiated release from debug build, but it prevented debug build from
// seeing subscription products. See also `android/app/src/debug/google-services.json`.
//applicationIdSuffix '.debug'
debuggable true
}
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
}
}
flutter {
source '../..'
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2'
}settings.gradle
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
// Update Gradle and Kotlin versions here
id "com.android.application" version '8.7.0' apply false
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
//id "com.google.gms.google-services" version "4.4.2" apply false
//id "com.google.firebase.crashlytics" version "3.0.2" apply false
// https://kotlinlang.org/docs/gradle-configure-project.html?utm_campaign=gradle-jvm-toolchain&utm_medium=kgp&utm_source=warnings#gradle-java-toolchains-support
id "org.gradle.toolchains.foojay-resolver-convention" version "0.8.0"
}
include ":app"Screenshots or Video
No response
Logs
Logs
$ flutter clean; flutter build apk
Deleting build... 1,917ms
Deleting .dart_tool... 10ms
Deleting Generated.xcconfig... 0ms
Deleting flutter_export_environment.sh... 0ms
Deleting .flutter-plugins-dependencies... 0ms
Deleting .flutter-plugins... 0ms
Resolving dependencies...
Downloading packages...
collection 1.18.0 (1.19.0 available)
email_validator 2.1.17 (3.0.0 available)
http_parser 4.0.2 (4.1.0 available)
leak_tracker 10.0.5 (10.0.7 available)
leak_tracker_flutter_testing 3.0.5 (3.0.8 available)
lints 5.0.0 (5.1.0 available)
material_color_utilities 0.11.1 (0.12.0 available)
meta 1.15.0 (1.16.0 available)
stack_trace 1.11.1 (1.12.0 available)
string_scanner 1.2.0 (1.3.0 available)
test_api 0.7.2 (0.7.3 available)
vm_service 14.2.5 (14.3.0 available)
Got dependencies!
12 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1384 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 warnings
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 warnings
Running Gradle task 'assembleRelease'... 88.6s
√ Built build\app\outputs\flutter-apk\app-release.apk (39.4MB)Flutter Doctor output
Doctor output
$ flutter doctor -v
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4249], locale en-US)
• Flutter version 3.24.3 on channel stable at C:\Users\ross\projects\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (3 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at C:\Users\ross\AppData\Local\Android\sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2024.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
[√] VS Code (version 1.93.1)
• VS Code at C:\Users\ross\AppData\Local\Programs\Microsoft VS Code
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.4249]
• Chrome (web) • chrome • web-javascript • Google Chrome 129.0.6668.71
• Edge (web) • edge • web-javascript • Microsoft Edge 129.0.2792.65
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.yamashita-room-335, Hecatoncheir, Harshavardhan-Kommineni, akhial, damcur and 49 morefa-fifi and FullstackWEB-developer
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team