https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

Jeff Lockhart

07/02/2022, 4:20 AM
I've found that the IDE is throwing a bunch of errors for my androidTest source set, where it doesn't see any of my commonTest code. This includes `expect class`es and other types defined there. The tests compile and run without issue, but the IDE errors and lack of code completion are unhelpful. Is this a known issue or is anyone aware of a resolution? Android Studio Chipmunk 2021.2.1 Patch 1 AGP 7.2.1 Kotlin 1.7.0
a

andylamax

07/02/2022, 4:32 AM
AS just fails so badly in MPP code, try opening in IDEA
j

Jeff Lockhart

07/02/2022, 5:43 AM
I just tried in IDEA 2022.1.3 and I'm getting the error:
This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 2021.2.1 or newer.
I tried updating the AGP to the latest beta and alpha versions and got the same error.
p

Paul Woitaschek

07/02/2022, 6:22 AM
You need to downgrade agp to 7.1 in order to use intellij
Which I strongly recommend if you want to use kmp
j

Jeff Lockhart

07/02/2022, 6:39 AM
I get the same error with AGP 7.1.3.
p

Paul Woitaschek

07/02/2022, 7:20 AM
Then try 7.0? But iirc 7.1 should work for sure
m

Michael Paus

07/02/2022, 9:35 AM
There have already been many and long discussions, even a video conference call with Jetbrains, about these issues but can anybody point me to a specific issue where the work and progress on this is tracked?
s

Sebastian Sellmair [JB]

07/02/2022, 1:00 PM
KTIJ-22111 from the back of my head
Try either dolphin, or downgrade AGP :/ Chipmunk does not work with multiplatform
22.2 beta2 will hopefully include most fixes
In any Case, I highly recommend only IntelliJ for multiplatform development for now!
j

Jeff Lockhart

07/02/2022, 4:10 PM
I had to go back to AGP 7.0.4 with IDEA 2022.1.3. Is this the recommended versions to use? Is it worth trying the IDEA EAP?
m

Michael Paus

07/02/2022, 4:40 PM
@Sebastian Sellmair [JB] Are you sure? https://youtrack.jetbrains.com/issue/KTIJ-22111
j

Jeff Lockhart

07/03/2022, 3:24 AM
I tried IDEA 2022.2 EAP and while it works with the latest AGP 7.2.1, it has the same issue as Android Studio, where commonTest code isn't seen by the IDE in androidTest code. This is the case even when using AGP 7.0.4, which works in IDEA 2022.1.3 without the IDE errors.
It's working in Android Studio Dolphin 2021.3.1 Beta 4 as well.
s

Sebastian Sellmair [JB]

07/03/2022, 1:50 PM
Yes, this is the ticket. Android Studio Chipmunk got merged into IJ 2022.2 eap's and this is what breaks a lot of things. Dolphin seems to have fixed issues on Google side. We're currently fixing the same issues in IJ for now based on Chipmunk. The process is not ideal, but will change in the future.
👍 1
m

Michael Paus

07/03/2022, 2:36 PM
Do you have a rough estimate of when we can expect a working IJ again? Are we talking about days, weeks or months? It’s important for my personal planning.
r

Racka N

07/04/2022, 10:09 AM
@Sebastian Sellmair [JB] are certain that it's fixed in Dolphin Beta 4? I just tried Dolphin and the same issue
s

Sebastian Sellmair [JB]

07/04/2022, 10:29 AM
I cannot speak for Android Studio releases, since I do not have access to its source files for beta/canary release branches. I can only say, that we noticed things being horribly broken after merging Chipmunk into IntelliJ and we’re currently working on resolving this (ETA 22.2 beta2)
When Android Studio is causing issues, you might want to use Googles issuetracker or ping the Android Studio team about it!
r

Racka N

07/04/2022, 10:36 AM
I'm on 2022.2 EAP7 right now. I'll wait for the fix in Beta 2.
9 Views