My code run without any picture but when I add an image in background and run the app in my phone. The error says - the app has stopped. My code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/apple_01">
My image's name is apple_01
.
You should try with another pic from file drawable such as
@drawable/abc_ab_share_pack_mtrl_alpha
if your app run correctly you should exchange the image
您可能正在尝试使用OutOfMemoryExeption来减小可绘制对象的像素大小,可以使用photoshop或任何其他软件来缩小图像大小
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.