Vitamio Sample Error - Java.lang.unsatisfiedlinkerror: Couldn't Load Vinit Findlibrary Returned Null
I'm having trouble running the vitamio-sample from https://github.com/yixia/VitamioBundle. I am building it with Android Studio and it compiles fine and runs, but when it gets to t
Solution 1:
I am not sure if there is a cleaner way in the newer version of Vitamino (or gradle). But here is how I got it to work with gradle build tools 0.6.
Added a project to my /libraries directory with the vitamino source/sdk. This has a /libs/armeabi /libs/armeabi-v7a with libvinit.so inside.
In my build.gradle for my main project, reference the library project like:
dependencies { // other dependencies compile(project(':libraries:vitamio')) }
Add the following to the bottom of my build.gradle
task copyNativeLibs(type: Copy) { from(new File(project(':libraries:vitamio').getProjectDir(), 'libs')) { include '**/*.so' } into newFile(buildDir, 'native-libs') } tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn copyNativeLibs } clean.dependsOn'cleanCopyNativeLibs' tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask -> pkgTask.jniDirnewFile(buildDir, 'native-libs') }
Then when i run a clean and rebuild it will copy the native libs to the proper spot and include them in the build.
Post a Comment for "Vitamio Sample Error - Java.lang.unsatisfiedlinkerror: Couldn't Load Vinit Findlibrary Returned Null"