Include Native *.so Library in APK With Android Studio
Originally posted on:http://www.kylethielk.com/blog/include-native-so-library-in-apk-with-android-studio/
Using the Android NDK is well documented throughout the internet if you are still using Eclipse. The process is basically the same with Android Studio until the time comes to build your APK. The APK will build fine, but your library *.so file will be missing from the APK and when you attempt to load it with System.loadLibrary(“mylibrary”) you will get:
1 |
|
You can view the contents of your APK with the following command to verify libmylibrary.so is not in the APK:
1 |
|
Android Studio’s build tool will not look in the usual place:
1 |
|
The trick (thanks to this thread: https://groups.google.com/forum/#!msg/adt-dev/nQobKd2Gl_8/Z5yWAvCh4h4J) is to move libmylibrary.so to:
1 |
|
Voila, your native code is now compiled into your APK. This should work with build tools 0.8+
Include Native *.so Library in APK With Android Studio的更多相关文章
- Support Library官方教程(3)android studio中导入支援包
Support Library Setup How you setup the Android Support Libraries in your development project depend ...
- 使用Android design support library在Eclipse和Android Studio
背景:为了在低版本号下使用Android 5.0的一些新特新 Eclipse篇: 1.将Android Manager中的Android support library升级到最新,我的为22.2.1' ...
- APK在Android Studio下如何签名
apk签名的意义 Android系统要求每一个Android应用程序必须要经过数字签名才能够安装到系统中,也就是说如果一个Android应用程序没有经过数字签名,是没有办法安装到系统中的! Andro ...
- 【转】如何使用Android Studio把自己的Android library分发到jCenter和Maven Central
转自:http://www.devtf.cn/?p=760&utm_source=tuicool 如何使用Android Studio把自己的Android library分发到jCenter ...
- 如何通过Android Studio发布library到jCenter和Maven Central
http://www.jianshu.com/p/3c63ae866e52# 在Android Studio里,如果你想引入任何library到自己的项目中,只需要很简单的在module的build. ...
- Android Studio将引用第三方jar包的library打包成jar包
在该module的build.gradle中添加 task makeJar(type: Jar) { archiveName 'mysdk.jar' from('build/intermediates ...
- (转载) android studio library生成jar包和aar的方法总结
android studio library生成jar包和aar的方法总结 标签: android学习文档jar和aar的使用与生成gradle 2016-11-25 10:39 1782人阅读 评论 ...
- Android Studio编译好的apk放在哪里?
Eclipse中编译好的apk文件时在bin文件中面的,可是在Android Studio有一个比較大的修改了,编译好的apk在android studio里面是直接看不到了,并且apk文件所在文件夹 ...
- 【Android Studio安装部署系列】十、Android studio打包发布apk安装包
版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 使用Android studio发布apk安装包的操作步骤. 开始打包发布apk Build > Generate Signe ...
随机推荐
- Go循环引用问题
在Go中,不支持循环引用,即package a引用了packageb以后,package b就不能引用package a了. 最简单的场景: package a中定义context.go用来保存上下文 ...
- [转]Linux Ubuntu上架设FTP
Linux Ubuntu上架设FTP http://www.blogjava.net/stonestyle/articles/369104.html 操作系统:ubuntu (GNU/Linux) 为 ...
- Ubuntu 12.04 Desktop配置XAMPP【转】
转载:[ubuntu][xampp]开发环境配置 XAMPP 并不适用于生产环境,而仅供开发环境使用.XAMPP 被设置为尽量开放,并提供开发者任何他/她想要的功能.这对于开发环境来说是很棒的,但对于 ...
- 结对开发--课堂练习--c++
一.题目与要求 题目: 返回一个整数数组中最大子数组的和. 要求: 入一个整形数组,数组里有正数也有负数. 数组中连续的一个或多个整数组成一个子数组,每个子数组都有一个和. 求所有子数组的和的最大值. ...
- mui开发
http://blog.csdn.net/sunhuaqiang1/article/details/46848005
- LabView调用C#混合模式dll
在一些特定要求下,我们的C#可能需要制作dll给LabView进行调用,并且我们不能够保证C#的程序是完全自己写而不调用第三方的dll库.很多时候我们需要使用诸如Sqlite.Net.AForge.N ...
- Class.forName("com.mysql.jdbc.Driver");的作用
对于大的项目当然我们都已经有了原有基本框架,但是对于一些新的技术探讨的时候,我们还是直接调用Class.forName("com.mysql.jdbc.Driver")连接数据库进 ...
- 学习JQuery的$.Ready()与OnLoad事件比较
$(document).Ready()方法 VS OnLoad事件 VS $(window).load()方法接触JQuery一般最先学到的是何时启动事件.在曾经很长一段时间里,在页面载入后引发的事件 ...
- JS--中的 Cookie 与存储
Cookie 主要是在客户端进行一些简单的数据存储等,使用来提供本地化存储的脚本功能.Cookie 的处理环境本身是需要在服务器下进行的,但是现在的大部分浏览器都已经支持Cookie本地化的存储于处理 ...
- win8 修改msconfig 里面的"引导高级选项" 最大内存后 BSOD的解决方案
最近由于本人的电脑一直非常卡,于11.4日通过win8任务管理器分析发现 Peer Name Resolution Protocol Peer Networking Grouping Peer Net ...