For a start - I googled a lot on the bugs that I get and used and tried everything I found. However, I continue to receive them.
My build.gradle project file looks like this
buildscript { ext.kotlin_version = "1.2.31" repositories { google() jcenter() } dependencies { ..... classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" ..... } } module level build.gradle looks like this
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { ......... androidExtensions { experimental = true } } dependencies { .......... // kotlin implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" ......... } But I keep getting the following errors.
e: \pages\BaseActivity.kt: (16, 9): Unresolved reference: window e: \pages\GameActivity.kt: (37, 21): Unresolved reference: startActivity e: \pages\MenuActivity.kt: (30, 21): Unresolved reference: startActivity e: \util\FileUtil.kt: (19, 31): Unresolved reference: assets e: \util\FileUtil.kt: (21, 51): Unresolved reference: it e: \viewmodel\MenuViewModel.kt: (42, 70): Unresolved reference: finish As you can see, references to standard methods such as 'startActivity' or 'finish' are not recognized. Why then the cotlin cannot recognize them?
I started getting these errors after the project was uploaded - the version of the gredl and the gredl of the plug-in, the version of the plug-in cotlin and the versions of many libraries, but after I tried to sell it all, the errors did not go away.
Nobody started with such a problem?