Problem building app for android 12

Hi! I recently published my app here on fdroid, however a user has reported that they can’t install the app with android 12:

Parsing apk file failed!Maybe minSdk of apk is lower than current Sdk? Look into logcat for more specific warnings of Android’s PackageParser

The build recipe already follows these instructions so the sdk is available (wasn’t even building before). Is there something I’m missing?!

I saw something similar today with Open Document Reader. In its case, it’s a manifest failure:

failed to install at.tomtasche.reader_164.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl662567906.tmp/base.apk (at Binary XML file line #64): at.tomtasche.reader.ui.activity.MainActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]

Personally, I didn’t update gradle file to latest Android but it works for them with a lower target sdk. Just check that your app works:

compileSdkVersion 30
targetSdkVersion 30

I believe the issue here is the same as the one andrewc reported and thus not F-Droid specific.

Do note that if you update targetSdk, you are explicitly telling the Android OS you are opting in to new behavioral changes, so you should be extra careful, read the release notes (especially the part “Behavioral changes”) and test thoroughly before you release a new version with updated targetSdk.

I’ve sent you a patch that I believe fixes your issue, but I haven’t been able to test it because I don’t currently have a Flutter build setup:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.