Generate duplicate class in GreenADO in android

你离开我真会死。 提交于 2019-12-11 05:48:55

问题


why create duplicate package when generate library greenado?

this is generator

  private static final String PROJECT_DIR = System.getProperty("user.dir");

public static void main(String[] args) {
    Schema schema = new Schema(1, "com.greenado.db");
    schema.enableKeepSectionsByDefault();

    addTables(schema);

    try{
        DaoGenerator n=new DaoGenerator();
  n.generateAll(schema,PROJECT_DIR+ "\\app\\src\\main\\java");

    } catch (Exception e) {
        e.printStackTrace();
    }
}

回答1:


If you are using greenDAO 3.x Comment out the apply plugin: 'org.greenrobot.greendao' in your gradle file. Because it tries to generate the classes all over again.

So its either you use the greenDAO class generator or apply plugin: 'org.greenrobot.greendao'. You can't use both in 3.x



来源:https://stackoverflow.com/questions/39935916/generate-duplicate-class-in-greenado-in-android

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