MuntashirAkon/AppManager · error · ApkFileException
No base apk found.
Error message
No base apk found.
What it means
After iterating the zip entries of a split bundle (xapk/apks), no entry qualified as the base APK (e.g. base.apk), so the bundle is structurally incomplete and ApkFile refuses to continue. Faulty input: a bundle archive missing its base split.
Solutions
- Re-obtain the complete split bundle; ensure the base APK (base.apk) is included in the archive
- Do not strip or partially extract the bundle before passing it to ApkFile
- Validate the archive contents before import
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/src/main/java/io/github/muntashirakon/AppManager/apk/ApkFile.java:344 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/a0930fbb0be7a3ed.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/apk/ApkFile.java:344
try {
String jsonString = IoUtils.getInputStreamContent(mZipFile.getInputStream(zipEntry));
mApksMetadata = new ApksMetadata();
mApksMetadata.readMetadata(jsonString);
} catch (IOException | JSONException e) {
mApksMetadata = null;
Log.w(TAG, "The contents of info.json in the bundle is invalid", e);
}
} else if (fileName.endsWith(".obb")) {
mObbFiles.add(new ObbEntry(zipEntry));
} else if (fileName.endsWith(".idsig")) {
try {
mIdsigFile = mFileCache.getCachedFile(mZipFile.getInputStream(zipEntry), ".idsig");
} catch (IOException e) {
throw new ApkFileException(e);
}
}
}
if (mBaseEntry == null) throw new ApkFileException("No base apk found.");
// Sort the entries based on type and rank
Collections.sort(mEntries, (o1, o2) -> {
Integer int1 = o1.type;
int int2 = o2.type;
int typeCmp;
if ((typeCmp = int1.compareTo(int2)) != 0) return typeCmp;
int1 = o1.rank;
int2 = o2.rank;
return int1.compareTo(int2);
});
}
if (packageName == null) throw new ApkFileException("Package name not found.");
mPackageName = packageName;
}
private ApkFile(@NonNull ApplicationInfo info, int sparseArrayKey) throws ApkFileException {
mSparseArrayKey = sparseArrayKey;
mPackageName = info.packageName;View on GitHub (pinned to 0152f468fc)