今天,我有这样的一个错误:MultiDex应用程序的Android
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
我在写的build.gradle:
multiDexEnabled true
和
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
在我的清单:
android:name="android.support.multidex.MultiDexApplication"
而且在我的主要梅索德:
public class myMethode extends AppCompatActivity{
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
但我还是收到这些错误:
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
你的'MedicationScheduleActivity'有一个'NullPointerException' –
显示你的'MedicationScheduleActivity' –