背景图片导致Android崩溃 [英] Background image crashes android
本文介绍了背景图片导致Android崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在此代码中放入背景行时,我的应用程序崩溃.当我删除此行时,我的应用程序工作正常,当我使用另一张照片时,它也可以工作.有什么问题吗?
My application crashes when i put background line like in this code. When i delete this line my application works fine and also when i use another photo it also works. What's the problem?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/table2" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
主屏幕的背景也可以正常工作.但是在第二页中,这是有问题的.
The background for the main screen works fine also. But in the second page, it is problamatic.
推荐答案
谢谢大家.我将尺寸从2500x1900更改为1280x920,现在可以正常使用了.
Thanks to you all. I changed the dimensions from 2500x1900 to 1280x920, now it works.
这篇关于背景图片导致Android崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文