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 am using version 1.5 and have tried many ways here but not work.
And I found the solution!
This will force to create tables when starting the app:
public class SugarOrmTestApplication extends SugarApp {
@Override
public void onCreate() {
super.onCreate();
SugarContext.init(getApplicationContext());
// create table if not exists
SchemaGenerator schemaGenerator = new SchemaGenerator(this);
schemaGenerator.createDatabase(new SugarDb(this).getDB());
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
@Override
public void onLowMemory() {
super.onLowMemory();
}
@Override
public void onTerminate() {
super.onTerminate();
SugarContext.terminate();
}
}