Flutter build error in android : Execution failed for task ‘:package_info_plus:compileReleaseJavaWithJavac’. > error: invalid source release: 17

I was trying to deploy an Android beta version using fastlane. However, I was faced with a situation where deployment did not continue due to the same error.

These are my preferences.

package_info_plus : 6.0.0 || 7.0.0 || 8.0.0
I tried all three version but it didn’t work

I also added these things to gradle-wrapper.properties

distributionUrl=https://services.gradle.org/distributions/gradle-7.4.2-all.zip (or 8.0)
android.suppressUnsupportedCompileSdk=34

app/build.gradle file
It was originally 1.8, but I tried changing it to 17, but it still didn’t work.


android {
    namespace "com.example.app"
    compileSdkVersion flutter.compileSdkVersion
    ndkVersion flutter.ndkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = '17'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.app"
        // You can update the following values to match your application needs.
        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
        minSdkVersion 21
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
    }



setting


Gradle 8.0

Kotlin: 1.8.10
Groovy: 3.0.13
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 11.0.11 (AdoptOpenJDK 11.0.11+9)
OS: Mac OS X 11.0 x86_64

Project Structure – SDKs -> jbr-17




  • error –
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':package_info_plus:compileReleaseJavaWithJavac'.
> error: invalid source release: 17

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 49s
752 actionable tasks: 11 executed, 741 up-to-date

        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
        from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/forwardable.rb:240:in `sh'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/helper/gradle_helper.rb:32:in `trigger'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/actions/gradle.rb:60:in `run'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
        from Fastfile:28:in `block (2 levels) in parsing_binding'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/lane.rb:41:in `call'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/command_line_handler.rb:34:in `handle'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/commands_generator.rb:363:in `run'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/bin/fastlane:23:in `<top (required)>'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/bin/fastlane:25:in `load'
        from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/bin/fastlane:25:in `<main>'

I tried changing the versions of many things, including the jvm environment, but it still didn’t work.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật