This is regarding PSLab app update in Fdroid. We have recently created two flavors to support openstreet maps and Google maps. We use fdroid
flavor with openstreet maps to publish in Fdroid. Once the flavors were added (in v2.0.17), Fdroid build failed for obvious reasons and I updated the metadata file. When I try to build it, it seems building successful, but fails eventually with the following error log.
build log for $ fdroid build -v -l io.pslab
DEBUG: Reading 'config.py'
DEBUG: Getting git vcs interface for https://github.com/fossasia/pslab-android
DEBUG: Directory: build/io.pslab
DEBUG: > git rev-parse --show-toplevel
DEBUG: Directory: build/io.pslab
DEBUG: > git submodule foreach --recursive git reset --hard
DEBUG: Directory: build/io.pslab
DEBUG: > git submodule foreach --recursive git clean -dffx
DEBUG: Directory: build/io.pslab
DEBUG: > git -c core.askpass=/bin/true -c core.sshCommand=/bin/false -c url.https://.insteadOf=ssh:// -c url.https://u:p@bitbucket.org/.insteadOf=git@bitbucket.org: -c url.https://u:p@bitbucket.org.insteadOf=git://bitbucket.org -c url.https://u:p@bitbucket.org.insteadOf=https://bitbucket.org -c url.https://u:p@github.com/.insteadOf=git@github.com: -c url.https://u:p@github.com.insteadOf=git://github.com -c url.https://u:p@github.com.insteadOf=https://github.com -c url.https://u:p@gitlab.com/.insteadOf=git@gitlab.com: -c url.https://u:p@gitlab.com.insteadOf=git://gitlab.com -c url.https://u:p@gitlab.com.insteadOf=https://gitlab.com fetch origin
DEBUG: Directory: build/io.pslab
DEBUG: > git -c core.askpass=/bin/true -c core.sshCommand=/bin/false -c url.https://.insteadOf=ssh:// -c url.https://u:p@bitbucket.org/.insteadOf=git@bitbucket.org: -c url.https://u:p@bitbucket.org.insteadOf=git://bitbucket.org -c url.https://u:p@bitbucket.org.insteadOf=https://bitbucket.org -c url.https://u:p@github.com/.insteadOf=git@github.com: -c url.https://u:p@github.com.insteadOf=git://github.com -c url.https://u:p@github.com.insteadOf=https://github.com -c url.https://u:p@gitlab.com/.insteadOf=git@gitlab.com: -c url.https://u:p@gitlab.com.insteadOf=git://gitlab.com -c url.https://u:p@gitlab.com.insteadOf=https://gitlab.com fetch --prune --tags origin
DEBUG: Directory: build/io.pslab
DEBUG: > git remote set-head origin --auto
DEBUG: Directory: build/io.pslab
DEBUG: > git checkout -f HEAD
DEBUG: Directory: build/io.pslab
DEBUG: > git clean -dffx
DEBUG: Getting git vcs interface for https://github.com/fossasia/pslab-android
DEBUG: > git --version
git version 2.17.1
INFO: Using git version 2.17.1
DEBUG: Checking 2.0.18
INFO: Building version 2.0.18 (19) of io.pslab
INFO: Getting source for revision v2.0.18
DEBUG: Directory: build/io.pslab
DEBUG: > git rev-parse --show-toplevel
DEBUG: Directory: build/io.pslab
DEBUG: > git submodule foreach --recursive git reset --hard
DEBUG: Directory: build/io.pslab
DEBUG: > git submodule foreach --recursive git clean -dffx
DEBUG: Directory: build/io.pslab
DEBUG: > git -c core.askpass=/bin/true -c core.sshCommand=/bin/false -c url.https://.insteadOf=ssh:// -c url.https://u:p@bitbucket.org/.insteadOf=git@bitbucket.org: -c url.https://u:p@bitbucket.org.insteadOf=git://bitbucket.org -c url.https://u:p@bitbucket.org.insteadOf=https://bitbucket.org -c url.https://u:p@github.com/.insteadOf=git@github.com: -c url.https://u:p@github.com.insteadOf=git://github.com -c url.https://u:p@github.com.insteadOf=https://github.com -c url.https://u:p@gitlab.com/.insteadOf=git@gitlab.com: -c url.https://u:p@gitlab.com.insteadOf=git://gitlab.com -c url.https://u:p@gitlab.com.insteadOf=https://gitlab.com fetch origin
DEBUG: Directory: build/io.pslab
DEBUG: > git -c core.askpass=/bin/true -c core.sshCommand=/bin/false -c url.https://.insteadOf=ssh:// -c url.https://u:p@bitbucket.org/.insteadOf=git@bitbucket.org: -c url.https://u:p@bitbucket.org.insteadOf=git://bitbucket.org -c url.https://u:p@bitbucket.org.insteadOf=https://bitbucket.org -c url.https://u:p@github.com/.insteadOf=git@github.com: -c url.https://u:p@github.com.insteadOf=git://github.com -c url.https://u:p@github.com.insteadOf=https://github.com -c url.https://u:p@gitlab.com/.insteadOf=git@gitlab.com: -c url.https://u:p@gitlab.com.insteadOf=git://gitlab.com -c url.https://u:p@gitlab.com.insteadOf=https://gitlab.com fetch --prune --tags origin
DEBUG: Directory: build/io.pslab
DEBUG: > git remote set-head origin --auto
DEBUG: Directory: build/io.pslab
DEBUG: > git checkout -f v2.0.18
DEBUG: Directory: build/io.pslab
DEBUG: > git clean -dffx
INFO: Creating local.properties file at build/io.pslab/local.properties
INFO: Creating local.properties file at build/io.pslab/app/local.properties
DEBUG: Removing debuggable flags from build/io.pslab/app
INFO: Cleaned build.gradle of keysigning configs at build/io.pslab/app/build.gradle
INFO: Running 'prebuild' commands in build/io.pslab/app
DEBUG: Directory: build/io.pslab/app
DEBUG: > bash -x -c -- sed -i -e '/LOCAL_KEY/d' build.gradle
+ sed -i -e /LOCAL_KEY/d build.gradle
INFO: Cleaning Gradle project...
DEBUG: Directory: build/io.pslab/app
DEBUG: > gradle clean
> Configure project :app
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/padmal/Documents/fdroiddata/build/io.pslab/app/$ANDROID_NDK.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
> Task :app:clean UP-TO-DATE
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.0/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 0s
1 actionable task: 1 up-to-date
INFO: Scanning source for common problems...
WARNING: Found possible binary at docs/images/oscilloscope_channel_params.png
WARNING: Found possible binary at docs/images/instrument_accelerometer_view.png
WARNING: Found possible binary at docs/images/instrument_robotic_arm_view.png
WARNING: Found possible binary at docs/images/instrument_compass_view.png
WARNING: Found possible binary at docs/images/view_not_connected_nav_menu.png
WARNING: Found possible binary at docs/images/instrument_thermo_view.png
WARNING: Found possible binary at docs/images/instrument_gyro_view.png
WARNING: Found possible binary at docs/images/oscilloscope_data_analysis.png
INFO: Removing gradle-wrapper.jar at gradle/wrapper/gradle-wrapper.jar
INFO: Creating source tarball...
INFO: Building Gradle project...
DEBUG: Directory: build/io.pslab/app
DEBUG: > gradle assembleFdroidRelease
> Configure project :app
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/padmal/Documents/fdroiddata/build/io.pslab/app/$ANDROID_NDK.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
> Task :app:preBuild UP-TO-DATE
> Task :app:preFdroidReleaseBuild
> Task :app:compileFdroidReleaseAidl NO-SOURCE
> Task :app:compileFdroidReleaseRenderscript
> Task :app:checkFdroidReleaseManifest
> Task :app:generateFdroidReleaseBuildConfig
> Task :app:prepareLintJar
> Task :app:generateFdroidReleaseSources
> Task :app:javaPreCompileFdroidRelease
> Task :app:mainApkListPersistenceFdroidRelease
> Task :app:generateFdroidReleaseResValues
> Task :app:generateFdroidReleaseResources
> Task :app:mergeFdroidReleaseResources
> Task :app:createFdroidReleaseCompatibleScreenManifests
> Task :app:processFdroidReleaseManifest
> Task :app:processFdroidReleaseResources
> Task :app:compileFdroidReleaseJavaWithJavac
Gradle may disable incremental compilation as the following annotation processors are not incremental: realm-annotations-processor-5.8.0.jar (io.realm:realm-annotations-processor:5.8.0), butterknife-compiler-8.8.1.jar (com.jakewharton:butterknife-compiler:8.8.1).
Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.
Note: Version 5.13.1 of Realm is now available: https://static.realm.io/downloads/java/latest
Note: Processing class CompassData
Note: Processing class SensorDataBlock
Note: Processing class OscilloscopeData
Note: Processing class PowerSourceData
Note: Processing class LogicAnalyzerData
Note: Processing class DataMPU6050
Note: Processing class GasSensorData
Note: Processing class SensorLogged
Note: Processing class MultimeterData
Note: Processing class BaroData
Note: Processing class AccelerometerData
Note: Processing class ThermometerData
Note: Processing class ServoData
Note: Processing class GyroData
Note: Processing class LuxData
Note: Processing class WaveGeneratorData
Note: Creating DefaultRealmModule
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :app:compileFdroidReleaseNdk NO-SOURCE
> Task :app:compileFdroidReleaseSources
> Task :app:lintVitalFdroidRelease
> Task :app:mergeFdroidReleaseShaders
> Task :app:compileFdroidReleaseShaders
> Task :app:generateFdroidReleaseAssets
> Task :app:mergeFdroidReleaseAssets
> Task :app:signingConfigWriterFdroidRelease
> Task :app:transformClassesWithRealmTransformerForFdroidRelease
/home/padmal/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/4.0.1/4e606430c80c69b744d19c6ca1b269b68e297040/okhttp-4.0.1.jar: D8: Type `org.conscrypt.Conscrypt` was not found, it is required for default or static interface methods desugaring of `java.security.Provider okhttp3.internal.platform.ConscryptPlatform.getProvider()`
/home/padmal/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/4.0.1/4e606430c80c69b744d19c6ca1b269b68e297040/okhttp-4.0.1.jar: D8: Interface `org.conscrypt.ConscryptHostnameVerifier` not found. It's needed to make sure desugaring of `okhttp3.internal.platform.ConscryptPlatform$configureTrustManager$1` is correct. Desugaring will assume that this interface has no default method.
> Task :app:transformClassesWithDexBuilderForFdroidRelease
> Task :app:transformDexArchiveWithDexMergerForFdroidRelease
> Task :app:mergeFdroidReleaseJniLibFolders
> Task :app:transformNativeLibsWithMergeJniLibsForFdroidRelease
> Task :app:processFdroidReleaseJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForFdroidRelease
> Task :app:packageFdroidRelease
> Task :app:assembleFdroidRelease
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.0/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 30s
25 actionable tasks: 25 executed
INFO: Successfully built version 2.0.18 of io.pslab
DEBUG: Using androguard from "/usr/lib/python3/dist-packages/androguard/__init__.py"
DEBUG: Checking build/io.pslab/app/build/outputs/apk/fdroid/release/app-fdroid-release-unsigned.apk
DEBUG: > /home/padmal/Android/Sdk/build-tools/29.0.0/aapt version
DEBUG: > /home/padmal/Android/Sdk/build-tools/29.0.0/aapt dump badging build/io.pslab/app/build/outputs/apk/fdroid/release/app-fdroid-release-unsigned.apk
ERROR: Could not build app io.pslab: Wrong package ID - build 9 but expected io.pslab
INFO: Finished
INFO: 1 build failed
Following is my metadata file for the project.
Metadate file for io.pslab
Categories:
- Science & Education
License: Apache-2.0
WebSite: https://pslab.io
SourceCode: https://github.com/fossasia/pslab-android
IssueTracker: https://github.com/fossasia/pslab-android/issues
AutoName: PSLab
Description: |-
Pocket Science Lab hardware device provides an array of sensors for doing
science and engineering experiments. It provides functions of numerous
experimental devices such as an oscilloscope, a waveform generator, a frequency
counter, a programmable voltage & current source and a data logger. This app
exposes all the functionalities of device along with using Audio Jack as
Oscilloscope and Wave Generator. The app has built-in support for experiments
covering areas like electronics, electrical and physics etc.
RepoType: git
Repo: https://github.com/fossasia/pslab-android
Builds:
- versionName: 2.0.3
versionCode: 4
commit: v2.0.3
subdir: app
gradle:
- yes
- versionName: 2.0.4
versionCode: 5
commit: v2.0.4
subdir: app
gradle:
- yes
- versionName: 2.0.5
versionCode: 6
commit: v2.0.5
subdir: app
gradle:
- yes
- versionName: 2.0.6
versionCode: 7
commit: v2.0.6
subdir: app
gradle:
- yes
- versionName: 2.0.7
versionCode: 8
commit: v2.0.7
subdir: app
gradle:
- yes
- versionName: 2.0.8
versionCode: 9
commit: v2.0.8
subdir: app
gradle:
- yes
- versionName: 2.0.9
versionCode: 10
commit: v2.0.9
subdir: app
gradle:
- yes
- versionName: 2.0.10
versionCode: 11
commit: v2.0.10
subdir: app
gradle:
- yes
- versionName: 2.0.11
versionCode: 12
commit: v2.0.11
subdir: app
gradle:
- yes
- versionName: 2.0.12
versionCode: 13
commit: v2.0.12
subdir: app
gradle:
- yes
- versionName: 2.0.13
versionCode: 14
commit: v2.0.13
subdir: app
gradle:
- yes
- versionName: 2.0.14
versionCode: 15
commit: v2.0.14
subdir: app
gradle:
- yes
- versionName: 2.0.16
versionCode: 17
commit: v2.0.16
subdir: app
gradle:
- yes
- versionName: 2.0.17
versionCode: 18
commit: v2.0.17
subdir: app
gradle:
- fdroid
prebuild: sed -i -e '/LOCAL_KEY/d' build.gradle
- versionName: 2.0.18
versionCode: 19
commit: v2.0.18
subdir: app
gradle: fdroid
prebuild: sed -i -e '/LOCAL_KEY/d' build.gradle
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 2.0.18
CurrentVersionCode: 19
fdroid lint -v io.pslab
doesn’t output anything either.
What could be the possible reason for “Wrong package ID”?