Wrong package ID reported, but the package id didn't change

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'
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…

This should be fixed in the latest master of fdroid server tools.

Oh great thanks !
Out of curiosity, what was the issue ?

can’t find the issue right now, sorry

The issue was discussed here: https://gitlab.com/fdroid/fdroidserver/merge_requests/548

1 Like

I faced the same issue today using fdroidserver from pypi , had to use the latest from git, could it be the case ?
(the wiki uses “latest version” for the pypi installation, so trying to get the context)

The fix (merge request 548) was commited in 019ec6d4 on September 25th, although the pypi distribution https://pypi.org/project/fdroidserver/1.0.10/, even is showing September 26th, does not seem to contain it (did a diff)

In case of confirmation a pypi version bump could benefit, as it is blocking.

I have faced still issues on ‘fdroid update’ with new aapt ouptut (new build-tools 28.0.3).

Created merge request !591

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