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:
https://stackoverflow.com/que …


Relevant configuration versions currently used and tried:

kotlin-gradle-plugin:1.1.2-4 / 1.1.3
 anko-sdk15:0.8.3
 gradle:2.3.3
 
 compileOptions {
 sourceCompatibility JavaVersion.VERSION_1_8
 targetCompatibility JavaVersion.VERSION_1_8
 bracket

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

升级IDE&kotlin到以下版本后,此问题得到修复

Android Studio 3.0 beta 2
 kotlin version 1.1.4-2