【发布时间】:2015-06-07 07:37:58
【问题描述】:
我创建了DBHelper 类作为我的应用程序的数据库。当我点击按钮时,我想保存我的数据。
发生了这个错误:
Error:(55, 48) error: constructor DBHelper in class DBHelper cannot be applied to given types;
required: Context
found: <anonymous OnClickListener>
reason: actual argument <anonymous OnClickListener> cannot be converted to Context by method invocation conversion
我写了这段代码:
DBHelper dbHelper = new DBHelper(this); dbHelper.saveData(DataObjects);
【问题讨论】:
-
是的邮政编码,但我认为问题是“这个”
标签: android this onclicklistener android-context