在Android中启用multidex支持时,绿道无法创建类

时间:2015-08-31 09:57:03

标签: android android-gradle greendao android-multidex greendao-generator

只要在build.gradle中启用multidex支持,我就会在应用启动时收到以下错误。

    Could not find class '...Dao', referenced from method com.dao.DaoMaster.<init>

FATAL EXCEPTION: main
    java.lang.VerifyError: com/dao/DaoMaster
            at com.dao.DaoMaster$OpenHelper.onCreate(DaoMaster.java:57)

1 个答案:

答案 0 :(得分:1)

This answer帮助我找到了解决方案。

要解决此问题,我已更改

public class MyApplication extends Application

public class MyApplication extends MultiDexApplication