gpt4 book ai didi

android-studio,无法解析符号 SQLiteOpenHelper,上下文

转载 作者:行者123 更新时间:2023-11-29 20:02:19 24 4
gpt4 key购买 nike

我通过 greenDAO 创建了一个 Android 项目依赖项 greenDAO

并使用 greenDAO 创建一个模块化的 greendao-lib,但它不起作用。看 : enter image description here

这是build.gradle

apply plugin: 'java'
//apply plugin: 'com.android.library'
//apply plugin: 'com.android.application'


dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// android core
//compile 'com.android.support:appcompat-v7:23.2.0'
//classpath 'com.android.tools.build:gradle:1.3.1'
// green dao lib
compile 'de.greenrobot:greendao:2.1.0'
compile 'de.greenrobot:greendao-generator:2.1.0'
// javax annotation
compile 'org.glassfish:javax.annotation:10.0-b28'
// lombok
compile 'org.projectlombok:lombok:1.16.2'
// guava
compile 'com.google.guava:guava:18.0'
}

如何处理这个问题?

最佳答案

请检查您的导入部分,它应该如下所示。

import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

关于android-studio,无法解析符号 SQLiteOpenHelper,上下文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36097663/

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