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模式.它定义了一种全新的 ...
随机推荐
- postman小白教程
转载:之前看到的保存了下来,没有找到转载地址,所以如果侵权的话联系我加下转载地址,感觉这篇文章写的很好,详细
- xshell输入字母空格间距变大
按一下shift+空格(全角/半角转换的快捷键,引起的问题)
- squid代理服务问答
1. 简述一下squid的用途?squid可以做代理和缓存服务器,而做代理时,可以分为正向代理和反向代理.正向代理用在企业办公环境中,企业员工上网通过代理来上网,代理的缓存功能可以为企业节省宝贵的带宽 ...
- js去掉输入框的前后空格及一些常用正则表达式
去掉TextBox输入框两头的前后空格:onblur="this.value=this.value.replace(/^\s+|\s+$/g,'');" str为要去除空格的字符串 ...
- R语言基础篇——数据读写
1.键盘输入数据(适合小数据集) #创建一个指定模式但不含数据的变量 mydata<-data.frame(age=numeric(0),gender=character(0),weight=n ...
- httplib模块:(一个相对底层的http请求模块)
httplib是一个相对底层的http请求模块,期上有专门的包装模块,如urllib内建模块,goto第三方模块,但是封装的越高就约不灵活,比如urllib模块里的请求错误是就不会返回结果页的内容,只 ...
- Jquery WEUI 滚动加载(infinite)不触发
源代码:(1.0.1版本) Infinite.prototype.scroll = function() { var container = this.container; var offset = ...
- Object of type 'ndarray' is not JSON serializable
Object of type 'ndarray' is not JSON serializable import numpy as np import json arr=np.asarray([345 ...
- nodejs 报错
vue不是内部或外部命令的解决方法 1.在nodejs的安装目录下,找到vue.cmd,将此路径加到环境变量中,我是通过nvm管理node版本的,路径是C:\Users\hy\AppData\Roam ...
- pytorch 指定GPU训练
# 1: torch.cuda.set_device(1) # 2: device = torch.device("cuda:1") # 3:(官方推荐)import os os. ...