I've found that the IDE is throwing a bunch of err...
# multiplatform
j
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
AS just fails so badly in MPP code, try opening in IDEA
j
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
You need to downgrade agp to 7.1 in order to use intellij
Which I strongly recommend if you want to use kmp
j
I get the same error with AGP 7.1.3.
p
Then try 7.0? But iirc 7.1 should work for sure
m
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
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
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
@Sebastian Sellmair [JB] Are you sure? https://youtrack.jetbrains.com/issue/KTIJ-22111
j
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
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
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
@Sebastian Sellmair [JB] are certain that it's fixed in Dolphin Beta 4? I just tried Dolphin and the same issue
s
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
I'm on 2022.2 EAP7 right now. I'll wait for the fix in Beta 2.