无法在 Android Studio 中添加 .so 库

Cannot add .so lib in Android Studio

这是我得到的错误:

08-08 12:05:37.198 3680-3680/? E/AndroidRuntime: FATAL EXCEPTION: main
                                             Process: com.vidyo.VidyoClient, PID: 3680
                                             java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.vidyo.VidyoClient-1/base.apk"],nativeLibraryDirectories=[/data/app/com.vidyo.VidyoClient-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libVidyoClientApp.so"
                                                 at java.lang.Runtime.loadLibrary(Runtime.java:367)
                                                 at java.lang.System.loadLibrary(System.java:1076)
                                                 at com.vidyo.VidyoClientLib.LmiAndroidAppJni.<clinit>(LmiAndroidAppJni.java:692)
                                                 at java.lang.Class.newInstance(Native Method)
                                                 at android.app.Instrumentation.newApplication(Instrumentation.java:996)
                                                 at android.app.Instrumentation.newApplication(Instrumentation.java:981)
                                                 at android.app.LoadedApk.makeApplication(LoadedApk.java:573)
                                                 at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
                                                 at android.app.ActivityThread.-wrap1(ActivityThread.java)
                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
                                                 at android.os.Handler.dispatchMessage(Handler.java:102)
                                                 at android.os.Looper.loop(Looper.java:148)
                                                 at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

这是我的 build.gradle 的样子:

 apply plugin: 'com.android.application'

android {
compileSdkVersion 19
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.vidyo.VidyoClient"
    minSdkVersion 11
    targetSdkVersion 19
    ndkConfig.abiFilters "armeabi-v7a"
}

sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        res.srcDirs = ['res']
        jni.srcDirs = []
        jniLibs.srcDirs = ['libs']
    }
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

packagingOptions {
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/NOTICE'
}

}

dependencies {
compile project(':Libraries:drag-sort-listview:library')
compile project(':Libraries:BoxAndroidLibraryV2')
compile 'com.android.support:support-v4:19.1.0'
compile 'com.google.android.gms:play-services-base:7.3.0'

compile 'com.google.api-client:google-api-client:1.20.0'
compile 'com.google.api-client:google-api-client-android:1.20.0'
compile 'com.google.apis:google-api-services-drive:v2-rev165-1.20.0'
compile 'com.google.http-client:google-http-client:1.20.0'
compile 'com.google.http-client:google-http-client-gson:1.20.0'


compile files('libs/dropbox-android-sdk-1.6.1.jar')
}

这是我项目的结构。 https://s3.amazonaws.com/uploads.hipchat.com/39260/829560/lBv9TVa4GG0FiiF/upload.png

我尝试设置:jniLibs.srcDirs = ['libs'] as jniLibs.srcDirs = ['jni/lib'] 但是我得到了同样的错误。 我错过了什么?我还需要 declare/run 其他东西吗?

我从 jni 再次构建了我的 .so 库,之后它就工作了