Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while building app on android #16

Open
ashvini23may opened this issue Apr 21, 2022 · 5 comments
Open

Error while building app on android #16

ashvini23may opened this issue Apr 21, 2022 · 5 comments

Comments

@ashvini23may
Copy link

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

@markshancock
Copy link

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)

@markshancock
Copy link

markshancock commented Feb 27, 2023

@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

@markshancock
Copy link

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

@bloxofcodes
Copy link

@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,

@PezzoniL
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants