应用程序在Android设备上运行时背景图像不可见?

应用程序在Android设备上运行时背景图像不可见?,android,android-layout,Android,Android Layout,android:background=“@drawable/bkg1” Android studio会显示图像,但当应用程序在手机上运行时,不会显示 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout

android:background=“@drawable/bkg1”

Android studio会显示图像,但当应用程序在手机上运行时,不会显示

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/bkg1"  >


> P>问题可能在图片中,所以尝试使用这个代码(如果它显示红色背景,然后考虑使用另一个图片)



问题可能在图片中,所以尝试使用这个代码(如果它显示红色背景,然后考虑使用另一个图片)



请尝试在此布局上创建任何其他内容,如“创建”按钮。如果按钮不可见,则未设置布局。如果它可见,请尝试更改图像或从设备卸载apk,然后运行生成项目。

请尝试在此布局上创建任何其他内容,如“创建”按钮。如果按钮不可见,则未设置布局。如果可以看到,请尝试更改图像或从设备中卸载apk并构建项目,然后运行。

发布您的代码,xmlpost您的代码和xmlwhy使用
android:orientation=“vertical”
作为
RelativeLayout
?图片是否有特殊分辨率??我的照片是1920*1080,你可以像zahidul指出的那样去掉方向。这是一个线性布局,我只是把它改为相对,方向保持不变。播放图片并查看显示的图片。为什么要使用
android:orientation=“vertical”
进行
RelativeLayout
?图片是否有特殊的分辨率??我的照片是1920*1080,你可以像zahidul指出的那样去掉方向。这是一个线性布局,我只是把它改为相对,方向保持不变。播放图片并查看正在显示的图片。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent" android:background="#c04444">