I’m using the latest version of the fdroidserver build toolchain on my machine, and it reports the following error :
INFO: Successfully built version 2.3 of fr.xgouchet.packageexplorer
DEBUG: > /opt/android/sdk/build-tools/28.0.2/aapt dump xmltree build/fr.xgouchet.packageexplorer/app/build/outputs/apk/release/app-release-unsigned.apk AndroidManifest.xml
DEBUG: Checking build/fr.xgouchet.packageexplorer/app/build/outputs/apk/release/app-release-unsigned.apk
DEBUG: > /opt/android/sdk/build-tools/28.0.2/aapt version
DEBUG: > /opt/android/sdk/build-tools/28.0.2/aapt dump badging build/fr.xgouchet.packageexplorer/app/build/outputs/apk/release/app-release-unsigned.apk
ERROR: Could not build app fr.xgouchet.packageexplorer: Wrong package ID - build 9 but expected fr.xgouchet.packageexplorer
When looking at the output of the aapt dump badging […]/app-release-unsigned.apk
command, I can see the following line :
package: name='fr.xgouchet.packageexplorer' versionCode='15' versionName='2.3' compileSdkVersion='28' compileSdkVersionCodename='9'
sdkVersion:'19'
targetSdkVersion:'28'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
So it seems my package name is indeed what it’s supposed to be. Could it be the linting tool read the compileSdkVersionCodename
field incorrectly and then assumes it’s the package name ? Looking at the APK_ID_TRIPLET_REGEX
, it seems it shouldn’t, but I can’t figure out where the reported 9
comes from…