gpt4 book ai didi

android - 无法解析 Android Studio 中 net.sqlcipher 导入中的符号 'database'

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

不知道为什么我有这个无法解析 net.sqlcipher 中的符号“数据库”。我只是克隆了 SQLCipher Android Test来自 GitHub 并想测试。

也附上截图以供引用。 enter image description here

谢谢...

最佳答案

在将 compileOptions 添加为 JavaVersion 8 并启用 JACK 后,我现在可以编译了

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig 中添加了 Jack 选项

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

非常感谢你们的帮助。

关于android - 无法解析 Android Studio 中 net.sqlcipher 导入中的符号 'database',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51782216/

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