无法将CouchBase Lite作为模块导入

时间:2017-10-19 11:06:46

标签: android couchbase-lite

我需要在我的一个项目中导入Couchbase Lite。我不想使用Gradle。基本上我正在做的是:

  1. 我已经从github
  2. 下载了这个项目
  3. 我已将其导入为新模块(File-> New-> Impor module-> path)
  4. 在完成项目后,我面临一个错误,

      

    无法解析符号AndroidContext

    所以我需要班级

      

    AndroidContext

    那个类是here所以我试图将它像prevuse一样导入,就像模块一样,但是我遇到了这个错误。

    enter image description here

    我做错了什么?我应该做什么导入CouchBase lite到android不使用

      

    compile' com.couchbase.lite:couchbase-lite-android:1.4.0'

1 个答案:

答案 0 :(得分:0)

您可能还需要其他一些依赖项:

    implementation 'com.couchbase.lite:couchbase-lite-android:1.4.4'
    // To access the database through HTTP (often used for hybrid development and peer-to-peer sync).
    implementation 'com.couchbase.lite:couchbase-lite-java-listener:1.4.4'
    // To use ForestDB as the storage type.
    compile 'com.couchbase.lite:couchbase-lite-android-forestdb:1.4.4'
    // To enable encryption on SQLite databases.
    compile 'com.couchbase.lite:couchbase-lite-android-sqlcipher:1.4.4'
    // JavaScript view (map/reduce) engine for the REST API.    
    compile 'com.couchbase.lite:couchbase-lite-java-javascript:1.4.4'

gradle包含的完整文档为here