Error while building app on android

Open
#16 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, kotlin

Research direction

Start by reviewing the Android build configuration that sets compileSdkVersion and ext.kotlin_version, then inspect BlueMS/src/main/java/com/st/BlueMS/demos/HighSpeedDataLog/tagging/HSDTaggingViewModel.kt around line 167. Reproduce the build with the reported dependency versions and resolve the SDK and Kotlin compatibility errors without leaving the maxBy reference unresolved.

Written by the indexing model from the issue text.

Description

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

Dominant language
Kotlin
Stars
132
Forks
73
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from STMicroelectronics/STBLESensor_Android

All issues in STMicroelectronics/STBLESensor_Android

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.