Android – sugar ORM does not have such table exceptions
•
Android
Sugar ORM works perfectly on Android < 5, but it crashes on Android 5. I use version 1.4
Please help me
Error: android.database.sqlite.sqliteexception: there is no such table: audio (code 1):, while compiling: select * from audio
proguard-rules.pro
-keep class me.lobanov.mp3downloadsfree.models.** { *; }
My modeling class:
package me.lobanov.mp3downloadsfree.models;
import com.orm.SugarRecord;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString
public class Audio extends SugarRecord {
private long aud_id;
private String aud_artist;
private String aud_title;
private String aud_url;
private long aud_duration;
public Audio() {
}
public Audio(long aud_id, String aud_artist, String aud_title, String aud_url, long aud_duration){
this.aud_id = aud_id;
this.aud_artist = aud_artist;
this.aud_title = aud_title;
this.aud_url = aud_url;
this.aud_duration = aud_duration;
}
}
My application class:
public class App extends SugarApp {
@Override
public void onCreate() {
super.onCreate();
}
}
My list:
<Meta-data android:name="DATABASE" android:value="mp3downloadsfree.db" />
<Meta-data android:name="VERSION" android:value="5" />
<Meta-data android:name="QUERY_LOG" android:value="true" />
<Meta-data android:name="DOMAIN_PACKAGE_NAME" android:value="me.lobanov.mp3downloadsfree.models" />
resolvent:
It's useful for me to disable instant running
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码