Любая идея, почему у меня это, не может разрешить «базу данных» символов в net.sqlcipher. Я просто клонировал Тест SQLCipher для Android из GitHub и хотел протестировать.
также приложили снимок экрана для справки.

Спасибо...
Поделись своим градиентом
это будет его градл raw.githubusercontent.com/sqlcipher/sqlcipher-android-tests/…
import net.sqlcipher.database.SQLiteDatabase;
import net.sqlcipher.database.SQLiteOpenHelper;
НЕ
import android.database.Cursor;
ДЕЛАТЬ
import net.sqlcipher.Cursor;
Вы должны использовать
Для раздела app/build.gradle
compile (name: 'android-database-sqlcipher-3.5.9', ext: 'aar')
Добавьте ниже файл build.gradle проекта
repositories {
jcenter()
}
Затем File-> Sync Project with Gradle Files & Clean->Rebuild Project.
Прочитать SQLCipher for Android Application Integration
К вашему сведению
We initially tested adding Java 8 support via the Jack toolchain. Over time, we realized the cost of switching to Jack was too high for our community when we considered the annotation processors, bytecode analyzers and rewriters impacted. Thank you for trying the Jack toolchain and giving us great feedback. You can continue using Jack to build your Java 8 code until we release the new support. Migrating from Jack should require little or no work.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
о, я все еще использую старую версию Gradle. так что это compile 'net.zetetic:android-database-sqlcipher:3.5.9@aar вместо implementation. В остальном то же самое.
@MinSoe сначала импортирует import net.sqlcipher.Cursor;
это то же самое. под net.sqlcipher ничего нет
@MinSoe добавить compile (name: 'android-database-sqlcipher-3.5.9', ext: 'aar')
@MinSoe После изменения Перезагрузите IDE.
Теперь я могу скомпилировать после того, как добавил compileOptions как JavaVersion 8 и включил JACK
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Jack Options добавлен внутри defaultConfig
jackOptions {
enabled true
}
Теперь мой app/build.gradle стал таким.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "net.zetetic.sqlcipher.test"
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// For testing zip-based distributions:
//compile files('libs/sqlcipher.jar')
// For testing AAR packages:
compile 'net.zetetic:android-database-sqlcipher:3.5.9@aar'
}
Большое спасибо за вашу помощь, ребята.
Рад видеть вас исправленным. Можно отключить jackOptions. Я думал, вы добавили JAVA 8. Прочтите developer.android.com/studio/write/…
да. мой был в Gradle 2. После обновления до Gradle 3 я смог удалить jackOptions
синхронизировать Gradle, очистить и перестроить проект