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模式.它定义了一种全新的 ...
随机推荐
- js 获取屏幕宽高
网页可见区域宽: document.body.clientWidth 网页可见区域高: document.body.clientHeight 网页可见区域宽: document.body.offset ...
- python基础-5 冒泡排序、递归
上节总结 一.上节内容补充回顾 1.lambda func = lambda x,y: 9+x 参数: x,y 函数体:9+x ==> return 9+x func: 函数名 def func ...
- 版本控制工具 GIT 简要教程
一,Git 简介 其实这个就不用说了 但是国际惯例还是介绍一下吧; Git 是一个开源的分布式版本控制系统,用于敏捷 高效地处理任何或小或大的项目. Git 是 Linus Torvalds 为了帮助 ...
- Eclipse解除已关联的Coding远程仓库,重新关联github上的远程仓库
1.在Eclipse中的Git Repositories中找到要解除的仓库,依次找到Remote--origin[视自己的实际情况选择], 2.选中origin,右键选择Delete Remote , ...
- BZOJ 1085(IDA*)
题面 传送门 分析 首先,直接搜索肯定会TLE 很容易想到用迭代加深的方法,限定搜索深度 但是,这样仍然不够,需要用启发式的方法优化 我们设计一个估价函数f(x)=g(x)+h(x)f(x)=g(x) ...
- Hibernate快速入门之CRUD
一.Hibernate的基本概念 前言 Hibernate是一个ORM框架,ORM是Object Relational Mapping的缩写,即对象关系映射,也就是将面向对象思想的编程语言与关系型数据 ...
- HTML水平居中和垂直居中的实现方式
父元素是块元素,根据子元素不同分为以下几种: 1.子元素是行内元素: a.水平居中:在父元素上设置text-align:center; b.垂直居中:在行内子元素上设置行高与父元素相同line-hei ...
- Sersync 上配置 Sersync 服务
上面的工作做好之后呢,下面就开始正式配置我们的 Sersync 了! 我们在 Sersync 安装过程中所用到包均是从谷歌 Sersync 项目组取得的,地址: https://code.google ...
- 01scikit-learn数据集下载
In [2]: from sklearn.datasets import load_iris iris = load_iris() iris.keys() Out[2]: dict_keys(['da ...
- Linux–Nginx攻略
什么是Nginx Nginx (“engine x”) 是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器.Nginx是由Igor Sysoev为俄罗斯访问量第二的Ra ...