android - GreenDao can't set up database -


i'm using greendao android project. there little problem! can't start application, because there failure on database connection

the error:

could not find class "...\daomaster" referenced form method "...\oncreate 

i can't find solution, say, depends on "this" in devopenhelper statement. solutions don't help.

here code:

public class mainactivity extends activity {  //db helper , dao private sqlitedatabase db; private daomaster daomaster; private daosession daosession; private notedao notedao; private cursor cursor;  @override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_main);      //set database     devopenhelper helper = new daomaster.devopenhelper(this, "notes-db", null);     db = helper.getwritabledatabase();     daomaster = new daomaster(db);     daosession = daomaster.newsession();     notedao = daosession.getnotedao(); } } 

i had same problem. resolve problem changing build path force export android private libraries , put on top.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -