There is a topic we known as: "https://gist.github.com/khernyo/4226923", But i have try this method in gradle plugin 0.4.0+, it doesn't copy the so libs to apk.
So I'm confused. But I figured out a new way to hack this before gradle support.
The way is: use jar to copy so libs. Is it amazing?right?. Let me show how-to:
If you have the following structure:
project
|---libs
|---armeabi/xxx.so
|---xxx.jar
|---xxx.jar
1.We archive the armeabi folder to zip named:armeabi.zip with the folder in zip like: lib/armeabi/xxx.so
2.Rename armeabi.zip to armeabi.jar and put armeabi.jar into libs folder with the other jars.
3.And when we call
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
in our build.gradle file, it will extract the so libs to the apks.
分享到:
相关推荐
基于ijkplayer 0.8.8版本(github 2021年11月版本)编译的全平台全协议JNI libijkffmpeg.so。 支持open ssl, h265, rm, rmvb, rtsp rtmp。直播与本地播放全部支持。 编译的平台有:arm64-v8a armeabi armeabi-v7a x86 ...
包含libijkffmpeg.so、libijkplayer.so、libijksdl.so
下载附件中的so文件,放到对应的文件夹下,如libs/armv7-abi/libsqlite.so,并注意你的gradle是否引用了这个目录,如 jniLibs.srcDirs = ['libs'] 编译测试。 通过Android Studio的Analyze APK功能[Build -> ...
ijkplayer源码编译so库,完美支持rtsp、rtmp视频流播放,亲测可用。 需要配置build.gradle
该项目是一个使用Android Studio创建的,通过gradle编译的,存在多个模块的工程的gradle编译的事例。完整的模拟了第三方SDK,自己的SDK以及Demo的调用关系以及相关的gradle编译脚本。 该项目重点介绍的不同gradle...
android 官方推荐的串口通信.so包 官方的硬件过期了 这个是最新编译的版本 支持6.0以上的android手机 平板!
.so library on the Android platform 本篇文章已授权微信公众号 独家发布 背景: 公司项目,iOS端说Android端拍的视频,码率不对,他无法播放。图片和视频的选择或拍摄一直用的****,问了开源作者才知道录制的没做...
VLC在windows下编译十分麻烦,网上的资料都是用cywin的,现在NDK已经不需要cywin了,VLC用的是gradle编译,调试看起来也很麻烦,自带的例子功能太多了,进过1个星期的折腾,终于编译成功了,可是在平板和手机上都会...
原本cocos游戏的android工程编译时,需要将cocos的库文件进行编译,这些文件大部分是cpp文件,使用ndk-build工具编译cpp文件非常慢,而且非常耗cpu,大概需要30-40分钟才能编译完成. 这个demo,可以把CocosCreator....
首先,在buildscript的repositories里面加入mavenCenter,因为我们的库是公开在maven central的 buildscript { repositories { jcenter() mavenCentral() maven { url ...
build.gradle : apply plugin : ' jruby 'repositories { // so we can find JRuby mavenCentral()}task compileSass( type : GemExec ) { script ' sass ' inputs . file ' example.scss ' args ' example.scss '...
Note:这篇文章是基于Android Studio 3.01版本的,NDK是...如果选中复选框,则表示当前项目支持C++异常处理,如果支持,在项目Module级别的build.gradle文件中会增加一个标识 -fexceptions到cppFlags属性中,并且在so库
I converted it to build with gradle so it is easy to manage. All other credit goes to the Google Team. Feel free to fork and use this as a base project for any launchers you might want to make in the...
Gradleapp的build.gradle中添加dependencies { implementation "com.android.support:appcompat-v7:你的版本号" implementation "com.android.support:recyclerview-v7:你的版本号" implementation '...
#Android MUPDF 库项目(GRADLE)# 这是来自 ghostscript.com( ) 的项目。 所有 ndk 构建机制都是由 gradle 完成的。 SDK 更新为 android v-21,android ndk 更新为 v-10 USASGE 1.将所有相关的持有者从...
要运行示例应用程序,只需克隆此存储库并使用android studio进行编译,然后将其安装在连接的设备上即可。 特征 完整平台支持最新版本的TLS。 该平台支持最新的网络协议,例如HTTP / 2和QUIC。 用法 Maven ...
成功构建libsphinx.so ,Gradle可以自行构建应用程序,编译托管的Kotlin和Java代码,并包装上述步骤中的.so文件。 因此,如果仅更改Kotlin / Java代码,则以下命令将尽一切可能生成APK: ./gradlew build 生成的
鬼火引擎的Android版,需要使用NDK编译成so文件动态加载。相关参考链接:http://leosfantasyworld.blog.sohu.com/
所有参与直接编译的源码(包括第三方库)替换文件为“”啥的效果:避免so包含C:\ xxxx \ xxxx等显路径特征 很多代码内嵌明文文本(例如具体的资源名fishs / xiaochouyu.png)替换为函数+枚举,类似多语言方式,
可以用于在Android Studio下开发的OpenCV3项目库模版,已经经过对build.gradle和CMake的转移处理,可以直接在Android Studio 3.2中导入该模版, 快速启动你的OpenCV 3项目。