Empty folder importing external library

六眼飞鱼酱① 提交于 2019-12-12 21:14:09

问题


I want to import to my android project an external library: CouchBase lite I have cloned the library using Git

$ git clone git://github.com/couchbase/couchbase-lite-android.git

as well the submodules

git submodule update --init --recursive

In order to import the library to my Android project I am doing: file->New->Import Module

This screen is showing:

After click on finish, the project has been imported but the folder couchbase-lite-android appears empty as can see:

That is not correct as you can see in the local source folder which I used to import the library:

In fact I need to use the class AndroidContext from that library but it is not available .

This is my setting.gradle

include ':couchbase-lite-java-forestdb', ':libraries:couchbase-lite-java-core'

About the build.gradle I have a few:

This is my build.gradle(Module:app)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.example.jcr61782.importaingcoach"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile project(path: ':libraries:couchbase-lite-java-core')

}

What I am doing wrong?

来源:https://stackoverflow.com/questions/46929314/empty-folder-importing-external-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!