Solving UNEXPECTED TOP-LEVEL EXCEPTION: method ID not in [0, 0xffff]:

Android application (APK) files contain executable bytecode files in the form of Dalvik Executable (DEX) files, which contain the compiled code used to run your app. The Dalvik Executable specification limits the total number of methods that can be referenced within a single DEX file to 65,536, including Android framework methods, library methods, and methods in your own code. Getting past this limit requires that you configure your app build process to generate more than one DEX file, known as a multidex configuration.


Gradle build configuration to enable multidex,

Add "multiDexEnabled = true" in Gradle build configureation

  defaultConfig {
        applicationId "com.applitter.cricscore"
        multiDexEnabled = true
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"

For more info refer this goole document around this.