0

This is the error that I get:

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)

This is how my build.gradle looks like:

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

And this is the structure of my project. https://s3.amazonaws.com/uploads.hipchat.com/39260/829560/lBv9TVa4GG0FiiF/upload.png

I tried setting: jniLibs.srcDirs = ['libs'] as jniLibs.srcDirs = ['jni/lib'] But I get the same error. What am I missing? Do I need to declare/run something else?

rosu alin
  • 5,674
  • 11
  • 69
  • 150
  • Read my answer here to import *.SO libraries, try it http://stackoverflow.com/a/33164947/3626214 – Aspicas Aug 08 '16 at 10:26
  • if you check the picture with the structure, you see that I don't have a main folder inside the src. is this correct? I can't seem to fix it with option 1. And don't know how to do options 2 and 3 not having the src/main folder – rosu alin Aug 08 '16 at 10:33
  • Show me your AndroidStudio folders tree – Aspicas Aug 08 '16 at 12:35
  • Check this link: https://s3.amazonaws.com/uploads.hipchat.com/39260/829560/oJ1bwm4YSfG9e5C/upload.png @Aspicas as you can see. The src folder has inside just packages. No MAIN, and the res src, libs folders are directly inside the projects folder I'm guessing they worked on this project on Eclipse :-? not sure – rosu alin Aug 08 '16 at 12:41
  • mmm it's strange... prove it to create a new Android Studio project and check if `main` folder appear on this project and show me the Android studio tree screenshot not finder. – Aspicas Aug 08 '16 at 12:50
  • if I create a new Android Project, it has main. If I import a Eclipse project into AS, it is missing – rosu alin Aug 08 '16 at 13:08
  • This is the structure. let me know if you need anything else: https://s3.amazonaws.com/uploads.hipchat.com/39260/829560/sfBL0uG28ZOaqqx/upload.png – rosu alin Aug 08 '16 at 13:11
  • @Aspicas any ideeas what I should do regarding my issue? – rosu alin Aug 08 '16 at 13:30

1 Answers1

0

I build my .so library again, from the jni, and it worked after that

rosu alin
  • 5,674
  • 11
  • 69
  • 150