Issue
What is the reason behind it ? Is it for performance or compulsion? Please Explain
Solution
Because RoomDatabase
has defined methods, the inheriting class cannot be an interface. And because you write your undefined method in that abstract class, it cannot be a class.
public interface MyDatabase extends RoomDatabase // extend is not allowed for interface
public class MyDatabase extends RoomDatabase {
public abstract MyDao myDao(); // abstract method is not allowed for non abstract class
}
Answered By - Israel dela Cruz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.