Complie on android studio


#1

I use Android Studio & Kotlin language v.1.0.3-release-IJ143-105

I create 2 Project
Project frist create java class and method

public class Monitor{
public static class Lang{
public static String Eng = “en”
}
}

Project second import first project by gradle and use method by kotlin found error

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.system_splash_activity)
var lang:String = Monitor.Lang.Eng
}

Error Message:

Unresolved reference: Monitor
Excution failed for task “:app:complieDebugKotlin”.
> Compilation error. See log for more details

I try with many how
Clean Project ----> not work
Rebuild Project ----> not work
Sync Project with Gradle… ----> not work
Invalidate Caches ----> not work. But !! restart it work

How to reload reference don’t restart android studio?

Please help me. I wanna develop don’t restart android have new class


#2

I found problem real. but how to develop nothing with it.


#3

Seems your problem similar to https://youtrack.jetbrains.com/issue/KT-12912.
It’s fixed in 1.0.4 eap build


#4

Thank you so much. How to upgrade kotlin 1.0.3 to 1.0.4 for android studio


#5

To enable eap builds open “Tools/Kotlin/Configure Kotlin Plugin Updates”, select eap chanel and update plugin


#6

thank you so much. :smiley: