Kamel-Media / Kamel

Kotlin asynchronous media loading and caching library for Compose.
Apache License 2.0
595 stars 23 forks source link

0.7.1 version requires -jvm-target specification #53

Closed AndrewKolubov closed 10 months ago

AndrewKolubov commented 10 months ago

Error message is Cannot inline bytecode built with JVM target 17 into bytecode that is being built with JVM target 11. Please specify proper '-jvm-target' option. It will be nice to have in read me file the description of causes and ways to solve for multiplatform project.

luca992 commented 10 months ago

Could you try 0.7.2-SNAPSHOT I think it should not have that issue anymore. I'll publish a new version if that works

hossein4214 commented 10 months ago

I also have this issue, I don't know how to test the SNAPSHOT version. Can you tell me exactly what to do?

luca992 commented 10 months ago

I also have this issue, I don't know how to test the Snapchat version. Can you tell me exactly what to do?

@hossein4214 Just add maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") to your repositories probably in settings.gradle.kts and try implementation("media.kamel:kamel-image:0.7.2-SNAPSHOT")

AndrewKolubov commented 10 months ago

I've added this, but still could not find media.kamel:kamel-image:0.7.2-SNAPSHOT

hossein4214 commented 10 months ago

I also have this issue, I don't know how to test the Snapchat version. Can you tell me exactly what to do?

@hossein4214 Just add maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") to your repositories probably in settings.gradle.kts and try implementation("media.kamel:kamel-image:0.7.2-SNAPSHOT")

i have added this , but still have this error Cannot inline bytecode built with JVM target 17 into bytecode that is being built with JVM target 1_8.

luca992 commented 10 months ago

Try 0.7.2 should work out of the box. I set the jvm target to 1.8 everywhere. If it doesn't let me know

AndrewKolubov commented 10 months ago

Very strange case for me. When updated to 0.7.2 receive this error:

2 issues were found when checking AAR metadata:

  1.  Dependency 'androidx.emoji2:emoji2-views-helper:1.4.0' requires libraries and applications that
      depend on it to compile against version 34 or later of the
      Android APIs.

      :androidApp is currently compiled against android-33.

      Also, the maximum recommended compile SDK version for Android Gradle
      plugin 8.1.0 is 33.

      Recommended action: Update this project's version of the Android Gradle
      plugin to one that supports 34, then update this project to use
      compileSdk of at least 34.

      Note that updating a library or application's compileSdk (which
      allows newer APIs to be used) can be done separately from updating
      targetSdk (which opts the app in to new runtime behavior) and
      minSdk (which determines which devices the app can be installed
      on).

  2.  Dependency 'androidx.emoji2:emoji2:1.4.0' requires libraries and applications that
      depend on it to compile against version 34 or later of the
      Android APIs.

      :androidApp is currently compiled against android-33.

      Also, the maximum recommended compile SDK version for Android Gradle
      plugin 8.1.0 is 33.

      Recommended action: Update this project's version of the Android Gradle
      plugin to one that supports 34, then update this project to use
      compileSdk of at least 34.

      Note that updating a library or application's compileSdk (which
      allows newer APIs to be used) can be done separately from updating
      targetSdk (which opts the app in to new runtime behavior) and
      minSdk (which determines which devices the app can be installed
      on).

Updated compileSdk and targetSdk to 34 and it works fine. Not a problem for me, but may be critical for others. Used both 7.4.2 and 8.1.0 AGP versions

luca992 commented 10 months ago

Very strange case for me. When updated to 0.7.2 receive this error:

2 issues were found when checking AAR metadata:

  1.  Dependency 'androidx.emoji2:emoji2-views-helper:1.4.0' requires libraries and applications that
      depend on it to compile against version 34 or later of the
      Android APIs.

      :androidApp is currently compiled against android-33.

      Also, the maximum recommended compile SDK version for Android Gradle
      plugin 8.1.0 is 33.

      Recommended action: Update this project's version of the Android Gradle
      plugin to one that supports 34, then update this project to use
      compileSdk of at least 34.

      Note that updating a library or application's compileSdk (which
      allows newer APIs to be used) can be done separately from updating
      targetSdk (which opts the app in to new runtime behavior) and
      minSdk (which determines which devices the app can be installed
      on).

  2.  Dependency 'androidx.emoji2:emoji2:1.4.0' requires libraries and applications that
      depend on it to compile against version 34 or later of the
      Android APIs.

      :androidApp is currently compiled against android-33.

      Also, the maximum recommended compile SDK version for Android Gradle
      plugin 8.1.0 is 33.

      Recommended action: Update this project's version of the Android Gradle
      plugin to one that supports 34, then update this project to use
      compileSdk of at least 34.

      Note that updating a library or application's compileSdk (which
      allows newer APIs to be used) can be done separately from updating
      targetSdk (which opts the app in to new runtime behavior) and
      minSdk (which determines which devices the app can be installed
      on).

Updated compileSdk and targetSdk to 34 and it works fine. Not a problem for me, but may be critical for others. Used both 7.4.2 and 8.1.0 AGP versions

Yeah I think that's a compose 1.5.0 issue. I have the same issue in all my projects. Including the ones that don't use kamel.

luca992 commented 10 months ago

Related: https://stackoverflow.com/questions/76888624/is-the-mincompilesdk-of-jetpack-compose-1-5-api-level-34