4

I am using android studio 3.2.1 and Kotlin 1.2.71

 classpath 'com.android.tools.build:gradle:3.2.1'

 classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71'

for almost time whenever I build project getting below errors with respect to Kotlin classes name and object references

Eg: class DelUserIP

Unresolved reference: DelUserIP
: Cannot access class ‘input.DelUserIP’. Check your module classpath for missing or conflicting dependencies

but after an error, if I build project once again it will be success build without error after some build again I am experiencing same above error…

Sarath Kn
  • 2,680
  • 19
  • 24
ask
  • 69
  • 1
  • 8
  • Hey @ask, please check this answer. Hope it solves the issue. https://stackoverflow.com/a/34625454/4491971 – Mohit Ajwani Oct 17 '18 at 07:31
  • @MohitAjwani I am using both kotlin android studio latest and stable version after getting above mentioned error rebuild project its working fine but again and again i am experiencing same issue... – ask Oct 17 '18 at 07:40
  • 1
    Do you have a multi-module project? – yole Oct 17 '18 at 08:07
  • @ask I had similar issues when JVM that intelij was using (JDK 9) missmatched with jdk that kotlin was using (JDK 8)... Try check if those are equal as they should. –  Oct 17 '18 at 08:08
  • @yole don't had multi-module.. – ask Oct 17 '18 at 08:22
  • @UrošJarc using jdk1.8.0_121 – ask Oct 17 '18 at 08:26
  • @ask And your kotlin compiler: `File | Settings | Build, Execution, Deployment | Compiler | Kotlin Compiler` ? –  Oct 17 '18 at 08:40
  • @UrošJarc inside `File | Settings | Build, Execution, Deployment | Compiler` i didn't found kotlin compiler but inside `File | Settings | Other Settings | Kotlin Compiler` language version ,API version is- latest stable 1.2 – ask Oct 17 '18 at 08:52
  • @ask `File | Settings | Other Settings | Kotlin Compiler` Oh I'm sorry I was looking on intelij... –  Oct 17 '18 at 09:04
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/182034/discussion-between-ask-and-uros-jarc). – ask Oct 17 '18 at 14:36

1 Answers1

0

after renaming my package name of data classes from name "module" to some other name,then i didn't experienced issue again.

ask
  • 69
  • 1
  • 8