I have been trying to follow the newBoston tutorial and find myself with a runtime error when I click a button to write data to a database. LogCat displays \"Could not find a me
LogCat displays "Could not find a method addModuleButton(View) in the activity."
Your button seems to use the XML attribute android:onClick="addModuleButton"
, so simply change this:
public void onClick (View addModuleButton)
into this:
public void addModuleButton (View view)
From the onClick documentation:
This name must correspond to a public method that takes exactly one parameter of type View. For instance, if you specify
android:onClick="sayHello"
, you must declare apublic void sayHello(View v)
method of your context (typically, your Activity).