My project use plugin kapt to generate mapper.
When run app then can not compile Kotlin (image below) If remove plugin kapt then it not happend. To resolve I must restart Intellij IDE. Take more time.
My project use plugin kapt to generate mapper.
When run app then can not compile Kotlin (image below) If remove plugin kapt then it not happend. To resolve I must restart Intellij IDE. Take more time.
This is a Kotlin bug, you can vote and watch it for updates: https://youtrack.jetbrains.com/issue/KT-36253. A workaround is to kill the running Java processes.
I have this problem almost every build (Android Studio stable + Artic Fox).
Manual Solution (try this first, if it works continue)
Task manager > Processes > End "OpenJDK Platform Library" tasks (sometimes it's standalone, sometimes it's under "Android Studio")
OR
Task manager > Details > End "java.exe" tasks
Automated Solution
taskkill /f /IM java.exeTry This :
https://developer.android.com/studio/build/build-cache
Add this code :
// To re-enable the build cache, either delete the following
// line or set the property to 'true'.
android.enableBuildCache=false
After that clean project and restart android studio
Also you can try to use a different JDK (e.g. OpenJDK). It helped me.
File -> Project Structure -> SDK Locations -> JDK Location
You can reboot the system, it will help. But this problem will return soon. This is the bag of Android Studio 4.2 https://youtrack.jetbrains.com/issue/KT-36253