Hi I am getting this error with building after “a...
# amper
s
Hi I am getting this error with building after “applying” the kotlinx-serialization plugin:
Copy code
error: KLIB resolver: Could not find "~/Library/Caches/Amper/.m2.cache/org/jetbrains/kotlinx/kotlinx-serialization-core-iossimulatorarm64/1.8.0/kotlinx-serialization-core-iossimulatorarm64-1.8.0.klib"
configuration looks like this:
Copy code
settings:
  kotlin:
    serialization: json
Not sure what I might be doing wrong 🤔
👍 1
j
Hi! Thanks for your report! Could you please share a bit more about your project/setup? For example: 1. Which version of Amper are you using? Is it 0.5.0 or some later dev version? 2. Are you using Amper as a Gradle plugin, or as a standalone CLI tool? 3. Are you running on a mac (intel/arm?)? 4. What else do you have in your
module.yaml
? 5. Which command gives you this result?
s
Hi Jeoffrey. See below as requested, thanks
Copy code
1. JetBrains Amper version 0.5.0+e7ace8b
2. Standalone CLI tool
3. Mac ARM
4. module.yaml content 
5. amper build
module.yaml content
Copy code
product:
  type: lib
  platforms: [android, iosSimulatorArm64]

dependencies:
  - $compose.foundation: exported
  - $compose.material3: exported
  - org.jetbrains.androidx.lifecycle:lifecycle-runtime-compose:2.8.4

  - cafe.adriel.voyager:voyager-navigator:1.1.0-beta03
  - cafe.adriel.voyager:voyager-screenmodel:1.1.0-beta03
  - cafe.adriel.voyager:voyager-koin:1.1.0-beta03

  - io.insert-koin:koin-core:4.0.0: exported

  - com.russhwolf:multiplatform-settings-no-arg:1.2.0
  - com.russhwolf:multiplatform-settings-coroutines:1.2.0
  - com.russhwolf:multiplatform-settings-make-observable:1.2.0

  - io.ktor:ktor-client-core:3.1.1
  - io.ktor:ktor-client-content-negotiation:3.1.1
  - io.ktor:ktor-serialization-kotlinx-json:3.1.1
  - io.ktor:ktor-client-logging:3.1.1

  - org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0

dependencies@android:
  - androidx.activity:activity-compose:1.7.2: exported
  - androidx.appcompat:appcompat:1.6.1: exported
  - $compose.preview: exported
  - io.ktor:ktor-client-okhttp:3.1.1

dependencies@ios:
  - io.ktor:ktor-client-darwin:3.1.1

settings:
  compose: enabled
  kotlin:
    serialization: json
j
Thanks a lot!
This might be a bug in Amper. Just for the sake of it, could you please try replacing
serialization: json
with
serialization: enabled
? (you're already adding the json format yourself in your dependencies).
(Sorry I can't try myself, as I only have my Windows machine at hand right now)
You might also want to replace
org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0
with
$kotlin.serialization.json
to align the version with the bundled serialization
(I don't expect these changes to fix the issue, but it would eliminate some "weirdness" from the config, just to be sure)
s
thanks for taking the time to respond, @Joffrey. The issue remains after making the suggested changes
j
Ok, that's unfortunate, but expected. Thanks for trying! One other thing you could try, if you're bold, is the current latest dev version of Amper (even more experimental than Amper itself 😄, but it has a bunch of bugfixes)
s
okay. 😄 Let me try that. I’ll report back. thanks!
latest dev version works. thanks a lot, Joffrey
🎉 1
j
Nice, good to hear! You're very welcome!
Don't hesitate to report more issues / inconveniences you find along the way, either here or on YouTrack 😉
👍 1
thank you color 1
t
I had not noticed that dev version. Very nice! I don't suppose there is an easy to know what has changed/fixed/enhanced since 0.5?
j
The changelog will be published as part of the release when we release 0.6.0 ;) (you'll see the GitHub Release). In the meantime, if you're really interested you can check YouTrack and filter by
Fix version: {Next Amper version}
- not ideal, but should work 😆
👍 1