If i compile from Android Studio Build => Generate signeed App bundle / APK menu option works fine. The ide shows me to select the Key store and the path where i want to store the .abb file. Nice
But now i'm trying to automate this process so i tried to do it from console with the command:
./gradlew bundleRelease
However seems that this do different things as gives me an error:
> Configure project :app
WARNING: The option setting 'android.defaults.buildfeatures.buildconfig=true' is deprecated.
The current default is 'false'.
It will be removed in version 9.0 of the Android Gradle plugin.
You can resolve this warning in Android Studio via `Refactor` > `Migrate BuildConfig to Gradle Build Files`
> Task :app:kaptGenerateStubsReleaseKotlin FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:kaptGenerateStubsReleaseKotlin'.
> Error while evaluating property 'compilerOptions.jvmTarget' of task ':app:kaptGenerateStubsReleaseKotlin'.
> Get more help at .
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to .7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 5s
37 actionable tasks: 7 executed, 30 up-to-date
PS C:\AndroidProjects\SMTPM> ./gradlew bundleRelease
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
> Configure project :app
WARNING: The option setting 'android.defaults.buildfeatures.buildconfig=true' is deprecated.
The current default is 'false'.
It will be removed in version 9.0 of the Android Gradle plugin.
You can resolve this warning in Android Studio via `Refactor` > `Migrate BuildConfig to Gradle Build Files`
> Task :app:kaptGenerateStubsReleaseKotlin FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:kaptGenerateStubsReleaseKotlin'.
> Error while evaluating property 'compilerOptions.jvmTarget' of task ':app:kaptGenerateStubsReleaseKotlin'.
> Failed to calculate the value of property 'jvmTarget'.
> Unknown Kotlin JVM target: 22
* 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 .
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to .7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 14s
37 actionable tasks: 7 executed, 30 up-to-date
In my build.gradle i have already (as suggested in other answers):
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
The next process will be to set the cert store, etc in the build gradle file, i think that i will be able to do that step.
Any help with the current jvmTarjet problem?