I add an ImageView and assign the jpg file (a1.jpg), the file is 770Kb. When I run the project, it will crash and display a large number of error logs. I tried another jpg file, size 70 KB and run the project, and that is not a problem. What for? Thanks!
<ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:contentDescription="@string/Test_string" android:src="@drawable/a1" />
Error log
02-09 12:47:34.692: D/AndroidRuntime(1023): Shutting down VM 02-09 12:47:34.692: W/dalvikvm(1023): threadid=1: thread exiting with uncaught exception (group=0x40a70930) 02-09 12:47:34.802: E/AndroidRuntime(1023): FATAL EXCEPTION: main 02-09 12:47:34.802: E/AndroidRuntime(1023): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lighter.androidntest4/com.lighter.androidntest4.MainActivity}: android.view.InflateException: Binary XML file line
source share