p2panda / meli

Meli Android app built with p2panda for decentralised and offline-first collaboration
GNU Affero General Public License v3.0
12 stars 1 forks source link

Fix "The binary version of its metadata is 1.9.0, expected version is 1.6.0" warning/error from when building apk #95

Open achou11 opened 5 months ago

achou11 commented 5 months ago

We get these logs when building the apk (e.g. flutter build apk --flavor qa):

 Caught exception: Already watching path: /opt/hostedtoolcache/flutter/stable-3.22.0-x64/packages/flutter_tools/gradle
e: /home/runner/work/meli/meli/packages/app/build/device_info_plus/.transforms/0b08f51c6c294aadfe2a6adb7bfc60eb/transformed/out/jars/classes.jar!/META-INF/device_info_plus_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/85351bccb3aa791a68347e2c523931bf/transformed/jetified-activity-1.7.2/jars/classes.jar!/META-INF/activity_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/1b3464b103e3d90b8e479feab3585fa3/transformed/lifecycle-livedata-core-2.6.1/jars/classes.jar!/META-INF/lifecycle-livedata-core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/8629be9897db72bb81fde0280b8267da/transformed/lifecycle-livedata-2.6.1/jars/classes.jar!/META-INF/lifecycle-livedata_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/af0effb1e57044fca34d2e5a601eeb50/transformed/lifecycle-viewmodel-2.6.1/jars/classes.jar!/META-INF/lifecycle-viewmodel_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/c7593c1481253889033dae7ef4ed8c80/transformed/jetified-lifecycle-viewmodel-savedstate-2.6.1/jars/classes.jar!/META-INF/lifecycle-viewmodel-savedstate_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/c1106eb1ac9d7a471b76e0820f543ec0/transformed/jetified-core-ktx-1.10.1/jars/classes.jar!/META-INF/core-ktx_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/0d57e94cc07b59210817b7c5a9e0b67a/transformed/core-1.10.1/jars/classes.jar!/META-INF/core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/9fc6e500e29e82536f5fac959dafe4af/transformed/lifecycle-runtime-2.6.1/jars/classes.jar!/META-INF/lifecycle-runtime_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-common/2.6.1/10f354fdb64868baecd67128560c5a0d6312c495/lifecycle-common-2.6.1.jar!/META-INF/lifecycle-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/faef907f3eb3625c07db1ef2933294e7/transformed/jetified-savedstate-1.2.1/jars/classes.jar!/META-INF/savedstate_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.0/8ee15ef0c67dc83d874f412d84378d7f0eb50b63/kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.0/8ee15ef0c67dc83d874f412d84378d7f0eb50b63/kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.0/8ee15ef0c67dc83d874f412d84378d7f0eb50b63/kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.9.0/cd65c21cfd1eec4d44ef09f9f52b6d9f8a720636/kotlin-stdlib-common-1.9.0.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.

I tried the suggestion from https://github.com/flutter/flutter/issues/145288#issuecomment-2003275223, which seems to eliminate many of the warnings and leaves it to the following:

e: /Users/andrewchou/GitHub/p2panda/meli/packages/app/build/device_info_plus/.transforms/815f8e72e81d9943394dd0b98de28ffb/transformed/out/jars/classes.jar!/META-INF/device_info_plus_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
e: /Users/andrewchou/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.0/8ee15ef0c67dc83d874f412d84378d7f0eb50b63/kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
e: /Users/andrewchou/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.0/8ee15ef0c67dc83d874f412d84378d7f0eb50b63/kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
e: /Users/andrewchou/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.0/8ee15ef0c67dc83d874f412d84378d7f0eb50b63/kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
e: /Users/andrewchou/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.9.0/cd65c21cfd1eec4d44ef09f9f52b6d9f8a720636/kotlin-stdlib-common-1.9.0.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.

Looked up the one module that's readable and found https://github.com/fluttercommunity/plus_plugins/issues/2942, which suggests bumping Android Gradle Plugin to an even later version, but that requires using a new Gradle version. Didn't want to keep going with this unless I know that there's an end to the mole-whacking 😄

bethel-m commented 4 months ago

hello, were you able to resolve this error

Shirazbabar commented 3 months ago

hello, were you able to resolve this error The provided link has resolved the problem. https://github.com/flutter-stripe/flutter_stripe/issues/1669