Cant sign APK using apksigner tool

I have recently updated my meteor version and my current version is 2.3.6.
to self sign my apk i am using tools – jarsigner , build-tools/26.0.2/zipalign and build-tools/26.0.2/apksigner

when i run apksigner sign command i am getting the bellow error:

Exception in thread "main" com.android.apksig.apk.MinSdkVersionException: Failed to determine APK's minimum supported platform version. Use --min-sdk-version to override
        at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:332)
        at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89)
Caused by: com.android.apksig.apk.MinSdkVersionException: Failed to determine APK's minimum supported Android platform version

here is my mobile-config.js configs —

App.setPreference(‘android-targetSdkVersion’, ‘30’);

App.setPreference(‘android-minSdkVersion’, ‘22’);

You need at least build-tools 30.0.3 for targeting SDK version 30.

Can you try to upgrade your sdk build tools first and then try again?

1 Like

Thank you but issue is fixed now , its issue is with apksigner command, i am still using build tool version 26.0.2, is these cause any issues?

The issue has been resolved,
Fix: added --min-sdk-version 22 with apksigner sign command.