Hi I'm wondering if anyone has run into this issu...
# android-studio
n
Hi I'm wondering if anyone has run into this issue or have more insight on what this error means when trying to use live edit? I'm probably missing something obvious? "Live Edit post processing failure: Multiple MinApiDetected"
👀 2
c
What version of Compose and AGP is your app on?
n
AGP / Gradle
Compose Bom
Copy code
composeBom = "2023.05.01"
I should add when i create a brand new compose project it works awesome (so not an AS version issue etc)
Thanks for following this up Chris! 🙂
c
Also is this issue seen in Giraffe or Hedgehog?
n
Giraffe Beta 2
My gut feeling is that it might be something project setup related but not sure what it is referring to re MinApi 🙂
a
I believe this has something to do with Live Edit not able to determine which min-api to use when it live update a change that requires desugaring.
Would you be able to show us your project set up? Or tell us how we would be able to reproduce this on our end.
n
Hi Alan, Absolutely happy to share whatever is needed. Do you have more context on what it is referring to when it says MinApi? This might help me better understand how it applies to the project. In terms of minimum repro's again having more context on MinApi would help. When I create a brand new project Live edit works fine so it must be something project specific here. I'll try add some more details below to see if that helps at all?
Project Versions: Versions: Gradle Version: 8.0 AGP Version: 8.1.0-beta02 AS Version: Android Studio Giraffe | 2022.3.1 Beta 2 Compose BOM: "2023.05.01"
Project structure:
We use the gradle kotlin dsl + toml file for dependencies
Perhaps if we want to dive into more detail we move this conversation to DM's and then jump back here when we have an outcome 🙂
a
Thanks for getting back to us.
Fabien and I are looking at what causes this. I am going to assume you are aware what minapi level for typical Android development (let me know if you are unfamiliar with that term). So what happens is that each project should (as far as I am aware) have a single miniapi level set in the build files. When we attempt to Live Edit a specific file on a device, Android studio needs to know which is the minapi level your application wants to support. It needs to do this without referring to the build system.
Live Edit makes an attempt to understand your project's output and see if we can determine a single miniapi level.
But it seems like there are reports that Live Edit might not be able to do so for certain project setups and we are unable to determine why certain build output appears to have multiple miniapi
Fabien created a shell script to determine where that issue might coming from.
It is in this issue tracker (https://issuetracker.google.com/issues/283737440). If you can, please add some information to the bug tracker as well.
n
ohh when you say MinApi is it literally referring to the min android sdk version that we set?
I've run the script and added output to the attached issue. Thanks so much for chasing this one up! 🙂