gpt4 book ai didi

android - Sugar ORM 没有这样的表异常

转载 作者:太空宇宙 更新时间:2023-11-03 11:29:10 29 4
gpt4 key购买 nike

Sugar ORM 在 Android <5> 上完美运行,但在 Android 5> 上它会崩溃。我使用的是 1.4 版本

请帮帮我。

错误:android.database.sqlite.SQLiteException: no such table: AUDIO (code 1): , while compiling: SELECT * FROM AUDIO

proguard-rules.pro

-keep class me.lobanov.mp3downloadsfree.models.** { *; }

我的模型类:

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;
}
}

我的应用类:

public class App extends SugarApp {
@Override
public void onCreate() {
super.onCreate();
}
}

我的 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" />

最佳答案

禁用即时运行对我有用。

关于android - Sugar ORM 没有这样的表异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35792152/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com