shashi avatar image
shashi asked David Marginian commented

Build failed with irrelevant message while generating signed APK - Windows system

I followed this and this documents to generate a signed apk in my windows system.

In the final step after running this command in terminal "gradle assembleRelease" I get the following build failure in the terminal.

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\android\ePaymentAmericaNew\ePaymentAmerica\ePaymentAmerica\app\build.gradle' line: 2

* What went wrong:
An exception occurred applying plugin request [id: '']
> Failed to apply plugin ''.
   > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
     You can try some of the following options:
       - changing the IDE settings.
       - changing the JAVA_HOME environment variable.
       - changing `` in ``.

* 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 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.

  1. I tried switching the Java 11 to 8 and vice versa.
  2. JAVA_HOME is also set in environment variables. It is working for other apps when generating the APK.
  3. There is no such '' in ''.

This is my Module level build.gradle file

plugins {
    id ''
    id ''
    id ''

android {
    compileSdk 28

    defaultConfig {
        applicationId "com.***.clover.***.v1"
        minSdk 17
        targetSdk 25
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    signingConfigs {
        release {
//            storeFile file("ePaymentAmerica\\app\\CloverKey.jks")
            storeFile file("/.keystore")
            storePassword System.getenv("KEYSTORE_PASSWORD")
            keyAlias System.getenv("KEY_NAME")
            keyPassword System.getenv("KEY_PASSWORD")
            enableV1Signing true // Clover app APKs must use V1 signing (JAR signing)
            enableV2Signing false // prevents APKs from being signed with V2 scheme

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), ''
            signingConfig signingConfigs.release
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8


dependencies {

    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation ''
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
    implementation ''
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation 'com.clover.sdk:clover-android-sdk:221.9'
    implementation 'com.clover.sdk:clover-android-connector-sdk:221.9'

    //retrofit for api
    implementation ''
    implementation 'com.squareup.retrofit2:retrofit:2.0.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.0.2'

    // for images loading
    implementation 'com.github.bumptech.glide:glide:3.7.0'

    // Import the BoM for the Firebase platform
    implementation platform('')
    // Declare the dependency for the Analytics library
    // When using the BoM, you don't specify versions in Firebase library dependencies
    implementation ''
    // Declare the dependencies for the Crashlytics libraries
    // When using the BoM, you don't specify versions in Firebase library dependencies
    implementation ''

This is my file

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# Automatically convert third-party libraries to use AndroidX


Can you help me in this?

Clover Mobile
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

This appears to be an environmental/build issue that isn't specific to Clover. I would try searching the broader internet for more information and a resolution.
0 Likes 0 ·

0 Answers


Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community