Skip to content

Error while building app on android #16

Open

Description

@ashvini23may

Hi, I am trying to build and install this source code on android but getting below error.

The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-29).

If I change compileSdkVersion to 31, then getting kotlin version mismatch errro

/.gradle/caches/transforms-3/0453560b92b97629cdc21df2bfebd566/transformed/jetified-core-ktx-1.9.0-alpha02-api.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.6.0, expected version is 1.1.16.

and if I change ext.kotlin_version = '1.6.0' getting this error

/STBlueMS_Android/BlueMS/src/main/java/com/st/BlueMS/demos/HighSpeedDataLog/tagging/HSDTaggingViewModel.kt: (167, 45): Unresolved reference: maxBy
/STBlueMS_Android/BlueMS/src/main/java/com/st/BlueMS/demos/HighSpeedDataLog/tagging/HSDTaggingViewModel.kt: (167, 53): Unresolved reference: it

Activity

  1. markshancock commented on Feb 27, 2023

    @markshancock

    I changed to Compile SDK version to 31 and now I get duplicate kotlin dependencies.
    It seems to be because the build in pulling in two different versions of jetified-kotlin-stdlib (1.8.10 and jdk-1.3.72)

  2. markshancock commented on Feb 27, 2023

    @markshancock

    @ashvini23may I updated the 'Module Settings' for all projects and subprojects to Compile SDK version 33 and set kotlin-stdlib-jdk7 dependency to version 1.8.20-Beta and now it builds

    I also had to get rid of "apply plugin: 'kotlin-android-extensions'" (deprecated) and replaced with kotlin-parcelize

  3. markshancock commented on Feb 27, 2023

    @markshancock

    The consequences of the 'kotlin-android-extensions' deprecation are deeper than I had thought.
    Ex: BlueMS uses kotlinx.android.synthetic.main.fragment_color_ambient_light which is no longer available

  4. bloxofcodes commented on Mar 10, 2023

    @bloxofcodes

    @ashvini23may I updated the 'Module Settings' for all projects and subprojects to Compile SDK version 33 and set kotlin-stdlib-jdk7 dependency to version 1.8.20-Beta and now it builds

    I also had to get rid of "apply plugin: 'kotlin-android-extensions'" (deprecated) and replaced with kotlin-parcelize

    hello I also encounter this error I follow your suggestion but unable to build,

  5. PezzoniL commented on Mar 10, 2023

    @PezzoniL
    Collaborator

    Ciao,
    we have just updated few days ago on the branch
    https://github.com/STMicroelectronics/STBlueMS_Android/tree/FullAppSnapshot

    one updated full snapshot of our application that it doesn't use git submodules
    try this code
    Ciao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions