Today i have a Error like these :
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
I write in my build.gradle :
multiDexEnabled true
and
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
In my Manifest:
android:name="android.support.multidex.MultiDexApplication"
And in my main methode :
public class myMethode extends AppCompatActivity{
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
But yet i receive these error:
03-15 12:15:37.066 19676-19676/de.example E/AndroidRuntime: FATAL EXCEPTION: main
03-15 12:15:37.066 19676-19676/de.example E/AndroidRuntime: Process: de.imatics.mediplan, PID: 19676
03-15 12:15:37.066 19676-19676/de.example E/AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {de.imatics.mediplan/de.example.MedicationScheduleActivity}: java.lang.NullPointerException