找不到针对net.sqlcipher.database.SQLiteDatabase.dbopen的实现

时间:2019-10-24 09:14:19

标签: android android-studio migration eclipse-adt

我将源代码从eclipse-adt迁移到了android studio。 现在,net.sqlcipher.database出现了一些错误。 迁移到android studio时是否需要一些设置或链接lib等? 我会错过这里要包含的东西吗? 因为同一源在Eclipse中运行良好,没有任何错误。

错误日志

  

memtrack无法加载memtrack模块(无此文件或目录)   android.os.Debug无法加载memtrack模块:-2

     

MyDBProvider UnsatisfiedLinkError!   art没有发现无效的实现     net.sqlcipher.database.SQLiteDatabase.dbopen(java.lang.String,int)(尝试     Java_net_sqlcipher_database_SQLiteDatabase_dbopen和     Java_net_sqlcipher_database_SQLiteDatabase_dbopen__Ljava_lang_String_2I)

build.gradle

 apply plugin: 'com.android.application'

android {
  signingConfigs {
      debug {
          storePassword 'android'
          keyAlias = 'androiddebugkey'
          keyPassword 'android'
          storeFile 
file('C:\\Users\\user\\Desktop\\key\\platform_x86.jks')
      }
  }
  compileSdkVersion 26
  buildToolsVersion "28.0.3"

  defaultConfig {
      applicationId "myEx"
      minSdkVersion 19
      targetSdkVersion 26
      multiDexEnabled true
  }

buildTypes {
    release {
        minifyEnabled false
        shrinkResources false
        debuggable true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
            signingConfig signingConfigs.debug
         }
    }
  }

dependencies {
//    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.android.support -v7:28.0.0'
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.google.guava:guava:18.0'

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:multidex:1.0.3'

}

此时错误

public static SQLiteDatabase sDB;

public Cursor query(Uri uri, String[] projection, String selection, 
String[] 
selectionArgs, String sortOrder) {

String orderBy = sortOrder;
SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
Cursor c = qb.query(sDB, projection, selection, selectionArgs, null, null, 
orderBy);

0 个答案:

没有答案