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.