Common Android .apk upload errors
Fixing error 4001502 (corrupt binary AndroidManifest.xml), unsigned APKs, and v1 vs v2/v3 APK Signature Schemes.
Error 4001502 — Invalid .apk file
BuildDrop returns error 4001502 when an uploaded .apk is not a valid compiled Android package:
- Plain
.ziprenamed to.apk: A valid.apkmust contain a compiled binary AXMLAndroidManifest.xmlat the archive root—raw source XML files will not parse or install on Android. - Truncated build artifact: Verify your CI job finished writing
app-release.apkbefore invokingPOST /api/upload. - Unsigned
-unsigned.apkoutput: Gradle'sassembleReleaseproducesapp-release-unsigned.apkwhen nosigningConfigis configured. Android refuses to install unsigned APKs; configure a debug or release keystore before uploading.
APK Signature Scheme v1 vs v2/v3 certificate dates
- When an
.apkincludes a v1 JAR signature (META-INF/*.RSA,*.DSA, or*.EC), BuildDrop extracts the X.509 signing certificate subject (CN=…) and exact expiration timestamp via OpenSSL. - Modern builds signed exclusively with APK Signature Scheme v2 / v3 (
APK Sig Block 42in the ZIP central directory) install normally on Android 7.0+; BuildDrop marks the v1 certificate validity date as APK Signature Scheme v2/v3 (date not embedded in META-INF) on/i/{hash}.