安卓界面插入背景图片,当图片内存太大时,界面在切换时会加载失败,这是什么原因呢?这是设置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. Ehab and a Special Coloring Problem

    You're given an integer nn. For every integer ii from 22 to nn, assign a positive integer aiai such ...

  2. SqlDataAdapter对象

    https://blog.csdn.net/qq_39657909/article/details/80615465 一.特点介绍 1.表示用于填充 DataSet 和更新 SQL Server 数据 ...

  3. MySQL执行外部sql脚本文件的命令

    sql脚本是包含一到多个sql命令的sql语句,我们可以将这些sql脚本放在一个文本文件中(我们称之为“sql脚本文件”),然后通过相关的命令执行这个sql脚本文件.基本步骤如下:1.创建包含sql命 ...

  4. git 本地回滚与远程库回滚

    不说废话,开始: 一.本地回滚: git reset --hard commit-id //回滚到commit-id 二.远程回滚操作分3步:①将本地分支退回到某个commit    ②删除远程分支  ...

  5. Flask的基本使用

    最基本的一个Flask模板,实现本地9898端口访问,页面返回hello world from flask import Flask app = Flask(__name__) @app.route( ...

  6. 作业1:使用go搭建一个web-server

    todo1:搭建web-server的原理 todo2:go实现web-server

  7. SpringBoot集成SwaggerUI

    1.在module下的pom.xml中引用相关插件 引用swagger插件并用参数化版本信息,如下 <?xml version="1.0" encoding="UT ...

  8. Web基础了解版08-JSTL-Core标签库

    JSTL JSP为我们提供了可以自定义标签库(Tag Library)的功能,用来替代代码脚本,Sun公司又定义了一套通用的标签库名为JSTL(JSP Standard Tag Library),里面 ...

  9. 6_9 天平(UVa839)<二叉树的DFS>

    前一个ubiquous通信小工具,移动只是一个由弦和电线组成的结构五彩缤纷的东西.这种移动通常被发现悬挂在小婴儿的摇篮.图说明了一个简单的移动.它只是一个电线,悬挂的一个字符串,每一个对象的对象.它可 ...

  10. JAVA基础学习(6)之使用对象

    6使用对象 6.1字符类型 6.1.1字符类型 char和int互相转换 //a比A大32 Scanner in=new Scanner(System.in); char c='B'; char c1 ...