安卓界面插入背景图片,当图片内存太大时,界面在切换时会加载失败,这是什么原因呢?这是设置android:background属性时发出的warning:

 Possible overdraw: Root element paints background @drawable/happy with a theme that also paints a background (inferred theme is @style/AppTheme)

分析:安卓模拟器运行内存较小,如果页面加载的图片内存过大,切换页面时,原页面并没有关闭,而是以缓存的形式存在后台,等待用户随时唤醒,本页面加上要跳转的页面需要
占用的运行内存资源已经超过了模拟器的运行内存,就会提示页面加载失败。

解决方法: 1.将需要显示的图片处理下,使其分辨率降低
2.更换运行内存更大的模拟器或者安卓手机
3.想办法在页面切换的同时结束掉之前页面的进程

Possible overdraw: Root element paints background @drawable/happy with a theme that also paints a background (inferred theme is @style/AppTheme)的更多相关文章

  1. AngularJS: 'Template for directive must have exactly one root element' when using 'th' tag in directive template

    .controller('HomeController', function($scope,$location) { $scope.userName='天下大势,为我所控!'; $scope.clkU ...

  2. android:background="@drawable/home_tab_bg"

    android:background="@drawable/home_tab_bg" home_tab_bg/xml: <bitmap xmlns:android=" ...

  3. Caused by: org.xml.sax.SAXParseException; systemId: file:/home/hadoop/hive-0.12.0/conf/hive-site.xml; lineNumber: 5; columnNumber: 2; The markup in the document following the root element must be well

    1:Hive安装的过程(Hive启动的时候报的错误),贴一下错误,和为什么错,以及解决方法: [root@master bin]# ./hive // :: INFO Configuration.de ...

  4. VUE之命令行报错:Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead 解决办法

    Failed to compile. ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-5992 ...

  5. which had no Root Element. This likely means the XML is malformed or missing

    今天按照古月老师的步骤,想在RViz中配置插件. 按步骤做下来后,一运行,出现如下错误: [E[ERROR] [1523370744.057263390]: Skipping XML Document ...

  6. VUE编译报错 Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead

    背景: 在使用VUE添加标签的时候编译报错,报错如下: Component template should contain exactly one root element. If you are u ...

  7. vue报错:Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

    在.vue文件中引入了 element-ui 的 table 和 pagination 组件后,报错:Component template should contain exactly one roo ...

  8. maven web项目的web.xml报错The markup in the document following the root element must be well-formed.

    maven项目里面的web.xml开头约束是这样的 <?xml version="1.0" encoding="UTF-8"?> <web-a ...

  9. Document root element "configuration", must match DOCTYPE root "mapper".

    最近剛剛鼓搗mybatis , 第一個demo就出了問題.其實原因是因為將mapper中的頭copy到了configuration里去了 <?xml version="1.0" ...

随机推荐

  1. 516,base64的原理及优缺点

    优点是可以加密,减少了http请求 缺点是需要消耗cpu进行编解码 适用于小图片 base的体积约为原图的4/3

  2. 每天进步一点点------Allegro 手工布线时控制面板各选项说明

    在进行手工布线过程中,最重要的就是对控制面板中的各个选项进行设置,因此首先介绍控制面板中各个选项的含义. 手工布线的命令为Route->connect,执行命令后,右侧控制面板如图8.14所示. ...

  3. Vue - 过渡 列表过渡

    列表的进入/离开过渡 获取不大于数组长度的随机数,作为插入新值的位置 <div id="app" class="demo"> <button ...

  4. Vue - 组件 Prop

    组件注册 全局注册 可在多个vue实例中使用 <div id="app"> <my-component></my-component> < ...

  5. [Python]python中assert和isinstance的用法

    assert语句是一种插入调试断点到程序的一种便捷的方式. assert == assert == True assert ( == ) print('-----------') assert ( = ...

  6. Windows server 2012文件服务器配置

    文件服务器的管理   Windows server 2012提供了易于使用的管理工具,让系统管理员更有效的管理服务器的资源. 安装文件服务器管理工具 添加角色-安装管理器 安装完成后直接可以在工具中打 ...

  7. mount命令实际操作样例

    本篇文章主要介绍了如何在Linux(CentOS 7)命令行模式安装VMware Tools,具有一定的参考价值,感兴趣的小伙伴们可以参考一下. 本例中为在Linux(以CentOS 7为例)安装VM ...

  8. java反射--超级好用的方法

    1.根据方法名,获取类的对应的方法 Method changeSessionIdMethod = ReflectionUtils.findMethod(HttpServletRequest.class ...

  9. js遍历传参到html

    <p id="subp" hidden><button id= "upsub"shiro:hasPermission="sys:me ...

  10. dropLoad.js移动端分页----Vue数据每次清空累加

    dropLoad.js移动端使用 1.需要引入  dropload   必要的两个文件dropload.css .dropload.min.js 此案例在vue项目中使用过程: var vm = ne ...