https://kotlinlang.org logo
Title
n

nickk

05/24/2018, 4:17 PM
While my project compiles fine, the Android Studio IDE (3.1.2) started to behave very strangely. It says
AppCompatActivity
cannot be resolved or “Unnecessary non-null check for [ERROR TYPE]“. Everyrthing that should be imported from
kotlinx.android.sythetic
appears in red. Any ideas? I cannot understand what triggered this. I am trying to use some code of my own from an .aar file, but this seemed to work fine. (Invalidate caches etc did not fix anything)
l

louiscad

05/24/2018, 4:37 PM
Try building the project
n

nickk

05/25/2018, 7:54 AM
Like I said, it compiles fine. It even installs an APK on my device.
l

louiscad

05/26/2018, 7:48 AM
Yes, but usually, compiling with Android Studio also fixes the errors
k

k4k4_dev

06/11/2018, 8:03 AM
to be honest man, Android Studio turned into buggy part of the world. For my project where we are developing it just from like 4 months ( 3 people) it builds fast, but when having some caches its impossible to fix those errors. Sometimes Invalidate caches and restard helps, but sometimes i need to reimport whole project from repository. Sad but don't give up and try even those ridicolous solutions.