jeudi 25 juin 2015

Android Database Example by a JavaGeek

Has anyone out there used this rather tidy database example (for beginners like me) by Chryssa Aliferi..? The entire code for the example is at the link below, so I won't reproduce it here;

http://ift.tt/1D8xXlV

I think it was setup for Eclipse, however I'm using Android Studio 1.2.2 and I get "error: cannot find symbol method" on two occurrences of getTitle() and one of getId() in MainActivity. Why can't the methods, which are present in Book.java part of the app, be resolved...?

I did get the app to run ok, after I hacked it a bit by dropping off .getTitle() and hard-coded the getId() to 1. Now I can only edit one record and I get the full string returned by the getAllBooks function...

Book [id-1, title=The Great Gadsby, author=F. Scott Fitzgerald]

This issue is exactly the same as asked by Michael Davis Feb 7 at 20:45

Aucun commentaire:

Enregistrer un commentaire