The Kotlin code modification directly’ run’ does not take effect in IDE, and must be uninstalled before it takes effect. what are the solutions or ideas

  android, question

After modifying the Kotlin code, you can directly run the project in Android Studio and see the compilation and installation process. however, the actual operation found that the kotlin code has not been modified (java modification is normal at the same time). the kotlin modification will take effect only after unloading the App and reloading or repeating the run action.

Android Studio Version 2.3.3 /3.0 canary 5
Instant run is not open

The same problem on stackoverflow: …

Relevant configuration versions currently used and tried:

kotlin-gradle-plugin:1.1.2-4 / 1.1.3
 compileOptions {
 sourceCompatibility JavaVersion.VERSION_1_8
 targetCompatibility JavaVersion.VERSION_1_8

Add some details
1. This is a historical project, only some new functions use kotlin code. This problem was discovered after adding kotlin code, and this problem only affects kotlin code. If you modify the code in other java modules, direct run will take effect.

2. in addition, Java.lang.classnotfoundexception for splashactivity often occurs.
Kt is also written in kotlin and enabled.multiDexEnabled, feel automatic subcontracting has a problem


Android Studio 3.0 beta 2
 kotlin version 1.1.4-2