question

khyati11 avatar image
khyati11 asked eva2323 sent

Not able to upload APK on clover sandbox

I'm having trouble uploading the APK of my Android application to the sandbox account. I've created the application (it appears on the App Marker), but APK upload fails with the following error:

No valid certificate found in APK. The signature file must be called META-INF/CERT.RSA.

1657263962869.png


android {
    compileSdkVersion 31
    buildToolsVersion "30.0.3"
    defaultConfig {
        applicationId "com.onusliquorsolution.discount_app"
        minSdkVersion 17
        //noinspection ExpiredTargetSdkVersion
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        abortOnError false
    }
    signingConfigs {
        debug {
            storeFile file('C:\\Users\\intel i5\\.android\\debug.keystore')
            keyAlias 'AndroidDebugKey'
            keyPassword 'android'
            storePassword 'android'
            v1SigningEnabled true  // Clover app APKs must use V1 signing (JAR signing)
            v2SigningEnabled false  // prevents APKs from being signed with V2 scheme
        }
        release {
            storeFile file('C:\\Users\\intel i5\\.android\\debug.keystore')
            keyAlias 'AndroidDebugKey'
            keyPassword 'android'
            storePassword 'android'
            v1SigningEnabled true  // Clover app APKs must use V1 signing (JAR signing)
            v2SigningEnabled false  // prevents APKs from being signed with V2 scheme
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
App Market
1657263962869.png (25.6 KiB)
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.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·
If you can link to the problem APK that would help.
0 Likes 0 ·
ankitmalviya avatar image
ankitmalviya answered

Please check CERT file name should be CERT.RSA.

- Rename .APK to .ZIP
- Extract META-INF/CERT.RSA


10 |2000

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

pradeep-27 avatar image
pradeep-27 answered pradeep-27 edited

Clean Project - > Manually delete release and debug folders files from your project


And Retry it

10 |2000

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

sydneyy avatar image
sydneyy answered

The error indicates that the APK is not properly signed with a valid certificate. To resolve this:

  1. Ensure the APK is signed using release keys and not debug keys.
  2. Use Android Studio or the apksigner tool to sign the APK.
  3. Verify the signed APK by running:
    bashCopy codejarsigner -verify -verbose -certs your_app.apk
    
  4. Confirm that the signature files (META-INF/CERT.RSA, CERT.SF) are present in the APK.

If the APK is not signed correctly, the upload will continue to fail.visitwebsite

10 |2000

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

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