Android Studio E/dalvikvm﹕ Could not find class '.DatabaseHelper', referenced from method .DatabaseManager

大城市里の小女人 提交于 2019-12-04 02:47:31

As you have multiDexEnabled true in your build.gradle. Make sure your application class is extending MultiDexApplication instead of the Application class.

Alternatively, as suggested in the docs, you can add the following method to your application class.

@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}

I've found the problem. MultiDex is not supported corretly prior to lollypop. Once i removed the additional libraries and remove multidex setting on gradle everything started to work fine.

remove.

 multiDexEnabled true 

Regards

I had the same issue some time a, try to turn off ProGuard

minifyEnabled false
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!