In my case near any line a red circle appeared with a cross and red line with a message: "No executable code found at line ..." like in Android studio gradle breakpoint No executable code found at line.
A problem appeared after updating of build.gradle
. We included Kotlin support, so a number of methods exceeded 64K. Problem lines:
buildTypes {
debug {
minifyEnabled true
Change them to:
buildTypes {
debug {
minifyEnabled false
debuggable true
Then sync a gradle with a button "Sync Project with Gradle Files". If after restarting of your application you will get an error: "Error:The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html", then, like in The number of method references in a .dex file cannot exceed 64k API 17 add the following lines to build.gradle
:
android {
defaultConfig {
...
// Enabling multidex support.
multiDexEnabled true
}
...
}
dependencies {
implementation 'com.android.support:multidex:1.0.2'
}
UPDATE
According to https://developer.android.com/studio/build/multidex.html do the following to enable multidex support below Android 5.0. Else it won't start in these devices.
Open AndroidManifest
and find tag <application>
. Near android:name=
is a reference to an Application class. Open this class. Extend Application class with MultiDexApplication
so:
public class MyApplication extends MultiDexApplication { ... }
If no Application class set, write so:
<application
android:name="android.support.multidex.MultiDexApplication" >
...
</application>