android7.0后对于detected problems with app native libraries提示框显示
log信息:
03-27 09:08:25.887 397 400 W linker : /data/app/com.guagua.qiqi-1/lib/arm/libMedia.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
03-27 09:08:26.807 397 400 W linker : /data/app/com.guagua.qiqi-1/lib/arm/libMedia.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
此log信息在android早期版本也会存在,但是在UI上不会有任何提示。
在7.0和7.1有新加如下的code:
/frameworks/base/core/java/android/app/Activity.java
final void performStart(){
...
6689
6690 // This property is set for all builds except final release
6691 boolean isDlwarningEnabled = SystemProperties.getInt("ro.bionic.ld.warning", 0) == 1;
6692 boolean isAppDebuggable =
6693 (mApplication.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
6694
6695 if (isAppDebuggable || isDlwarningEnabled) {
6696 String dlwarning = getDlWarning();
6697 if (dlwarning != null) {
6698 String appName = getApplicationInfo().loadLabel(getPackageManager())
6699 .toString();
6700 String warning = "Detected problems with app native libraries\n" +
6701 "(please consult log for detail):\n" + dlwarning;
6702 if (isAppDebuggable) {
6703 new AlertDialog.Builder(this).
6704 setTitle(appName).
6705 setMessage(warning).
6706 setPositiveButton(android.R.string.ok, null).
6707 setCancelable(false).
6708 show();
6709 } else {
6710 Toast.makeText(this, appName + "\n" + warning, Toast.LENGTH_LONG).show();
6711 }
6712 }
6713 }
对于有dlwarning的app,如果此app是debuggable模式或系统ro.bionic.ld.warning属性为1,那么会给app提示(以对话框的方式),需要完善或优化so库。
android7.0后对于detected problems with app native libraries提示框显示的更多相关文章
- Android7.0后JNI库必须保留Section Headers
此修改在官网的描述如下: Each ELF file has additional information contained in the section headers. These header ...
- android7.0后对于file://的限制
错误信息: 04-18 14:56:58.283 4440 4440 W System.err: android.os.FileUriExposedException: file:///stora ...
- Appirater -- app中提示用户为app评价的提示框
Appirater是一段你可以嵌入自己工程中的代码,在用户使用应用一段时间后会自动弹出提示用户进行评分. 使用Appirater方面,你可以简单把源代码嵌入你的app工程中,并把以下代码添加至它的委托 ...
- ASP.NET div信息提示框显示几秒后隐藏
今天在旧系统中,用户要求,要把一个javascript alert的信息提示,改为Div tag来显示,它在显示时,仅显示几秒,然后隐藏,这样无需用户去点击alert信息框的确定或是关闭铵钮. 下面I ...
- 拍照、本地图片工具类(兼容至Android7.0)
拍照.本地图片工具类:解决了4.4以上剪裁会提示"找不到文件"和6.0动态授予权限,及7.0报FileUriExposedException异常问题. package com.hb ...
- Android7.0 多窗口你值得拥有
Android7.0 多窗口你值得拥有 什么是多窗口分屏? 多窗口分屏其实在国内并不陌生,已经有一些手机和平板搭载了"分屏多任务"和"APP窗口化"功能,但这些 ...
- 【转】Android7.0适配心得
本文出自:贾鹏辉的技术博客(http://www.devio.org) http://www.devio.org/2016/09/28/Android7.0%E9%80%82%E9%85%8D%E5% ...
- Android7.0调用系统相机拍照、读取系统相册照片+CropImageView剪裁照片
Android手机拍照.剪裁,并非那么简单 简书地址:[我的简书–T9的第三个三角] 前言 项目中,基本都有用户自定义头像或自定义背景的功能,实现方法一般都是调用系统相机–拍照,或者系统相册–选择照片 ...
- Android7.0 Doze模式分析(一)Doze介绍 & DeviceIdleController
參考:http://blog.csdn.net/gaugamela/article/details/52981984 在Android M中.Google就引入了Doze模式.它定义了一种全新的 ...
随机推荐
- Hibernate的批量抓取
批量抓取理解:如果我们需要查找到客户的所有联系人的话,按照正常的思路,一般是首先查询所有的客户,得到返回的客户的List集合.然后遍历List集合,得到集合中的每一个客户,在取出客户中的联系人(客户表 ...
- 一篇包含了react所有基本点的文章
去年,我写了一本关于学习React.js的小书,原来是大约100页. 今年我要挑战自己,把它归纳为一篇文章. 本文不会涵盖什么是React,或者为什么要学习它. 相反,这是面向已经熟悉JavaScri ...
- python sys模块导入和模块的使用
sys故名思意,就是系统模块,系统模块内置很多方法,怎么样去调用方法呢 1,argv 参数 sys.argv() 2,exit() 退出程序 sys.exit() 3,version 获取版本信息 ...
- Ubuntu中找不到pip3命令的解决方法
Ubuntu中找不到pip3命令的解决方法 Ubuntu 有 python2 和 python3. 今天使用 Ubuntu 中的 python3 时,想要安装第三方库却发现 pip 指向的是 pyth ...
- Java缓存Ehcache-Ehcache的Cache在SSM框架中的配置
需要在Spring配置文件中配置: <!-- 配置缓存管理器工厂 --> <bean id="cacheManager" class="org.spri ...
- struts2导入多个xml引入报错<include>
struts.xml <?xml version="1.0" encoding="UTF-8"?> <!-- 指定Struts 2配置文件的D ...
- Docker备份镜像
docker save -o mycentos.tar mycentos_new:1.1 指定输出到的文件 执行后,运行 ls 命令即可看到打成的tar包, 因为有463M所以打包要一会
- Django集合Ueditor
语言版本环境:python3.6 1.win安装步骤: git下载源码https://github.com/zhangfisher/DjangoUeditor 解压DjangoUeditor3-mas ...
- noscript
<noscript> <article id="noscript" class="error info_panel"> <head ...
- kali优化配置(1)
前言 无论是工具还是物理机.虚拟机,我都遇到过惨绝人寰的配置错误.为了有效避免这些烦恼困住我,写一个排错文档之外,我还应当谨慎小心,从每一次配置走起..我的kali昨日的MySQL无法登陆,也没办法联 ...