I am getting the No Such table
exception when i am Using Sugar ORM with GPU image Android Library. I am using Gradle and Android Studio. Once i remove GPU image
I had this problem. I executed all suggestions posted here. But neither worked. Then I applied all together, and finally got rid of that problem. What I did-
1. Disabled instant run. (as Parth Vora said.)
2. Then I added the following class-
import android.app.Application;
import android.content.res.Configuration;
import com.orm.SugarApp;
import com.orm.SugarContext;
public class SugarOrmTestApplication extends SugarApp {
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(getApplicationContext());
Book.findById(Book.class, (long) 1);
}
@Override
public void onLowMemory() {
super.onLowMemory();
}
@Override
public void onTerminate() {
super.onTerminate();
}
}
3. Modified manifest file-
And this is my model class-
public class Book extends SugarRecord {
String title;
String edition;
public Book(){
}
public Book(String title, String edition){
this.title = title;
this.edition = edition;
}
}
Now my application works good.