In my case, a red circle appeared next to any line with a cross and a red line with the message: "No executable code was found in the line ...", as at the gradle breakpoint in Android studio. No executable code found in line .
The problem appeared after the build.gradle update. We included Kotlin support, so the number of methods exceeded 64K. Problem lines:
buildTypes { debug { minifyEnabled true
Change them to:
buildTypes { debug { minifyEnabled false debuggable true
Then synchronize Gradle using the "Sync Project with Gradle Files" button. If after restarting the application you receive the error message: "Error: the number of method references in the .dex file cannot exceed 64 KB. Find out how to solve this problem at https://developer.android.com/tools/building/ multidex.html ", as in " The number of method references in the .dex file cannot exceed 64 KB. API 17 adds 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. Otherwise, it will not start on these devices.
Open AndroidManifest and find the <application> . Next to android:name= is a reference to the application class. Open this class. Extend the Application class with MultiDexApplication as follows:
public class MyApplication extends MultiDexApplication { ... }
If the application class is not installed, write this:
<application android:name="android.support.multidex.MultiDexApplication" > ... </application>
CoolMind Feb 15 '18 at 14:55 2018-02-15 14:55
source share