zoukankan      html  css  js  c++  java
  • android--------解决Entities and POJOs must have a usable public constructor

    今天在学习android数据库,运行程序的时候报错,错误是:Entities and POJOs must have a usable public constructor. You can have an empty constructor or a constructor whose parameters match the fields (by name and type).Tried the following constructors but they failed to match:

    Word(java.lang.String,java.lang.String) -> [param:english_word -> matched field:unmatched, param:chinese_meaning -> matched field:unmatched]。

       解决方法:在实体类写一个空的构造函数即可。

      因为我有一个有参的构造函数,于是我写了一个空的构造函数即可运行。

      

       写一个空的构造函数:

     

      运行成功:

      

  • 相关阅读:
    代码1
    js中级第13天
    dom 浏览器模型
    js中级第12天
    js中级第11天
    js中级第十天
    js中级第九天
    js中级第8天
    js中级第六天
    js中级第七天
  • 原文地址:https://www.cnblogs.com/hrzgj/p/14850495.html
Copyright © 2011-2022 走看看