Android的 - 摇篮:复制到本机库
我很新到Android /摇篮构建环境和谷歌helpt我很多,但对于这个我已经尝试了很多东西,但似乎无法得到它的工作!
I am very new to the Android / Gradle build environment, and google helpt me a lot, but for this I have tried a lot of things, but can't seem to get it to work!!
当我尝试加载Vitamio库(它保存为.jar文件在/应用程序/库/ vitamio /,一切顺利,没有摇篮建立自己的错误。但是,当我启动应用程序,它给人的错误那vinit.so'无法找到。该解决方案是手动复制它的静态库....
When I try to load the Vitamio Library (its saved as .jar file inside /app/libs/vitamio/, everything goes well, there are no Gradle build error.. But when I start the app, it gives the error that 'vinit.so' cannot be found.. The solution is copying it manually to the static-libs....
查看问题 - > Vitamio样本误差 - java.lang.UnsatisfiedLinkError中:无法加载VINIT findLibrary返回null
现在我的文件夹结构如下:
Now my folder structure is as following:
ATTEMPT 1
Android工作室,摇篮,OpenCV的和NDK
错误:(69,0)无法找到任务属性jniLibs'':应用程序:packageDebug。
Error:(69, 0) Could not find property 'jniLibs' on task ':app:packageDebug'.
当我试着使用jniFolders,什么都不会发生。
When I try with jniFolders, nothing happens.
我把它放在很多文件夹里面,只是为了尝试。但它并没有任何区别...
I placed it inside a lot of folders, just to try.. But it doesn't make any difference...
更新1
我想复制的工作,我必须安装NDK并将其添加到local.properties文件,但现在它提供了以下错误:
I think the copying worked, I had to install NDK and add it to local.properties file, but now it gives the following error:
错误:摇篮:执行失败的任务:应用程序:compileDebugNdk。
发生起动过程中'命令'的问题/安卓/ NDK / NDK的构建
Error:Gradle: Execution failed for task ':app:compileDebugNdk'. A problem occurred starting process 'command '/android/ndk/ndk-build'
没有任何错误..任何帮助找到的debug.log somehwere,因为错误只字未提怎么回事错了...
Without any errors.. Any help in find a debug.log somehwere, because the error says nothing about whats going wrong...
摇篮,您可以处理依赖比使用JAR文件轻松了许多!打开该应用的build.gradle文件(有两个,打开你的屏幕截图,您张贴第一个),并加入这一行:
Gradle lets you handle dependencies a lot easier than using JARs! Open the app build.gradle file (there are two, open the first one in your screenshot that you posted) and add this line:
compile 'me.neavo:vitamio:4.2.2'
在依赖关系部分。