当我想把我的img从drawable放到我的活动中时
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_horizontal"
android:background="@drawable/bg"> <-------------------(here)
....
..
</LinearLayout>
android studio中没有问题,但是当我用模拟器运行它时,我的应用程序无法打开,它自动关闭,那么如何将我的img放到我的布局中?
这是日志错误
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.soalmasuk, PID: 3716
java.lang.RuntimeException: Canvas: trying to draw too large(149107744bytes) bitmap.
at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:260)
at android.graphics.Canvas.drawBitmap(Canvas.java:1415)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:545)
at android.view.View.getDrawableRenderNode(View.java:17314)