我通过greenDAO greenDAO
创建了一个Android项目依赖项用greeenDAO创建一个模块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'
}
如何处理这个问题?
答案 0 :(得分:2)
请检查您的导入部分,它应如下所示。
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
答案 1 :(得分:0)
//apply plugin: 'java'
apply plugin: 'com.android.library'