Error while building app on android
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
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)
@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
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
@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,
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