当前位置:网站首页>SO库依赖问题
SO库依赖问题
2022-04-23 02:12:00 【笑三少_Creat】
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libtestAdd
# Android N 开始,Google收缩了 so 库的依赖权限。
# 只有 system/app system/priv-app 下的应用可以依赖。
# data/app 下的安装应用是无法加载某些 so 库的,比如:libc++.so
# 添加下面两行配置表示so库可以依赖系统so库
LOCAL_NDK_STL_VARIANT := c++_static
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := src/myAdd.cpp
LOCAL_MODULE_PATH_64 := $(LOCAL_PATH)/lib #注意LOCAL_MODULE_PATH_64后面的_64,不加上编译64位会报错
include $(BUILD_SHARED_LIBRARY)
# Android N 开始,Google收缩了 so 库的依赖权限。 只有 system/app system/priv-app 下的应用可以依赖。data/app 下的安装应用是无法加载某些 so 库的,比如:libc++.so
所以需要添加下面两行:
LOCAL_NDK_STL_VARIANT := c++_static
LOCAL_SDK_VERSION := current
注意:使用第三方so库的先决条件:
1、第三方so库是否依赖其它so库
2、第三方so库运行的cup架构(如:mips64/x86/mips/x86_64/arm64-v8a/armeabi/armeabi-v7a)
3、第三方so库的头文件(.h)
示例代码:
大爷,赏个铜板呗

版权声明
本文为[笑三少_Creat]所创,转载请带上原文链接,感谢
https://blog.csdn.net/u011337503/article/details/124342558
边栏推荐
- Makefile文件是什麼?
- tp6阿里云短信 window 报 cURL error 60: SSL certificate problem: unable to get local issuer certificate
- Is the sinking coffee industry a false prosperity or the eve of a broken situation?
- [chrome extender] content_ Cross domain problem of script
- Kubernetes cluster installation based on Kirin SP10 server version
- 【dpdk】10. Dpdk DNS learning notes
- Leetcode46 Full Permutation
- Flink real-time data warehouse project - Design and implementation of DWS layer
- 不断下沉的咖啡业,是虚假的繁荣还是破局的前夜?
- 每日一题(2022-04-22)——旋转函数
猜你喜欢

Redis memory recycling strategy

What problems will you encounter when dialing VPS?

Want to experience homekit smart home? Why don't you take a look at this smart ecosystem

What businesses use physical servers?

New book recommendation - IPv6 technology and application (Ruijie version)

What business scenarios will the BGP server be used in?

013_ Analysis of SMS verification code login process based on session
![App optimization and advanced scoreboard Part 2 [Mui + flask + mongodb]](/img/86/77b67fd28d2583e12f397430a9a62a.png)
App optimization and advanced scoreboard Part 2 [Mui + flask + mongodb]

Wechat public platform test number application, authorized login function and single sign on using hbuilder X and wechat developer tools

PTA: praise the crazy devil
随机推荐
009_ Redis_ Getting started with redistemplate
Heap overflow of kernel PWN basic tutorial
PTA: Romantic reflection [binary tree reconstruction] [depth first traversal]
005_ redis_ Set set
89 logistic回归用户画像用户响应度预测
006_ redis_ Sortedset type
Tp6 Alibaba Cloud SMS Window message Curl Error 60: SSL Certificate Problem: Unable to get local issuer Certificate
Shardingsphere introduction and sub table usage
New book recommendation - IPv6 technology and application (Ruijie version)
[assembly language] understand "stack" from the lowest point of view
使用代理IP是需要注意什么?
Log4j2 configuration
006_ redis_ Jedis quick start
关于局域网浅谈
PTA: 浪漫倒影 [二叉树重建] [深度优先遍历]
2018 China Collegiate Programming Contest - Guilin Site J. stone game
012_ Access denied for user ‘root‘@‘localhost‘ (using password: YES)
What is BGP server and what are its advantages?
Makefile文件是什麼?
ThinkPHP kernel development blind box mall source code v2 0 docking easy payment / Alibaba cloud SMS / qiniu cloud storage