Receiving Inflate exception in XML file

Pongo

New Member
just now I imported an existing android application to my system. It causes InflateExceotion in the following xml file at the line\[code\]<ImageView\[/code\]I don't know why this error occurred. Because, it is running successfully in another system\[code\]<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent" android:layout_height="fill_parent"><ImageView android:id="@+id/image1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:background="@drawable/svs"/></RelativeLayout>\[/code\]Logcat:\[code\]03-29 10:55:37.621: E/AndroidRuntime(941): FATAL EXCEPTION: main03-29 10:55:37.621: E/AndroidRuntime(941): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app/com.app.ScreenActivity}: android.view.InflateException: Binary XML file line #4: Error inflating class <unknown>03-29 10:55:37.621: E/AndroidRuntime(941): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)03-29 10:55:37.621: E/AndroidRuntime(941): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)03-29 10:55:37.621: E/AndroidRuntime(941): at android.app.ActivityThread.access$600(ActivityThread.java:141)03-29 10:55:37.621: E/AndroidRuntime(941): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)03-29 10:55:37.621: E/AndroidRuntime(941): at android.os.Handler.dispatchMessage(Handler.java:99)03-29 10:55:37.621: E/AndroidRuntime(941): at android.os.Looper.loop(Looper.java:137)03-29 10:55:37.621: E/AndroidRuntime(941): at android.app.ActivityThread.main(ActivityThread.java:5041)03-29 10:55:37.621: E/AndroidRuntime(941): at java.lang.reflect.Method.invokeNative(Native Method)03-29 10:55:37.621: E/AndroidRuntime(941): at java.lang.reflect.Method.invoke(Method.java:511)03-29 10:55:37.621: E/AndroidRuntime(941): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)03-29 10:55:37.621: E/AndroidRuntime(941): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)03-29 10:55:37.621: E/AndroidRuntime(941): at dalvik.system.NativeStart.main(Native Method)03-29 10:55:37.621: E/AndroidRuntime(941): Caused by: android.view.InflateException: Binary XML file line #4: Error inflating class <unknown>03-29 10:55:37.621: E/AndroidRuntime(941): at android.view.LayoutInflater.createView(LayoutInflater.java:613)03-29 10:55:37.621: E/AndroidRuntime(941): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)03-29 10:55:37.621: E/AndroidRuntime(941): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)03-29 10:55:37.621: E/AndroidRuntime(941): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)03-29 10:55:37.621: E/AndroidRuntime(941): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)03-29 10:55:37.621: E/AndroidRuntime(941): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)03-29 10:55:37.621: E/AndroidRuntime(941): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)03-29 10:55:37.621: E/AndroidRuntime(941): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)03-29 10:55:37.621: E/AndroidRuntime(941): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)03-29 10:55:37.621: E/AndroidRuntime(941): at android.app.Activity.setContentView(Activity.java:1881)03-29 10:55:37.621: E/AndroidRuntime(941): at com.app.ScreenActivity.onCreate(ScreenActivity.java:19)03-29 10:55:37.621: E/AndroidRuntime(941): at android.app.Activity.performCreate(Activity.java:5104)03-29 10:55:37.621: E/AndroidRuntime(941): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)03-29 10:55:37.621: E/AndroidRuntime(941): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)03-29 10:55:37.621: E/AndroidRuntime(941): ... 11 more03-29 10:55:37.621: E/AndroidRuntime(941): Caused by: java.lang.reflect.InvocationTargetException03-29 10:55:37.621: E/AndroidRuntime(941): at java.lang.reflect.Constructor.constructNative(Native Method)03-29 10:55:37.621: E/AndroidRuntime(941): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)03-29 10:55:37.621: E/AndroidRuntime(941): at android.view.LayoutInflater.createView(LayoutInflater.java:587)03-29 10:55:37.621: E/AndroidRuntime(941): ... 24 more03-29 10:55:37.621: E/AndroidRuntime(941): Caused by: java.lang.OutOfMemoryError03-29 10:55:37.621: E/AndroidRuntime(941): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)03-29 10:55:37.621: E/AndroidRuntime(941): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502)03-29 10:55:37.621: E/AndroidRuntime(941): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:355)03-29 10:55:37.621: E/AndroidRuntime(941): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:785)03-29 10:55:37.621: E/AndroidRuntime(941): at android.content.res.Resources.loadDrawable(Resources.java:1965)03-29 10:55:37.621: E/AndroidRuntime(941): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)03-29 10:55:37.621: E/AndroidRuntime(941): at android.view.View.<init>(View.java:3330)03-29 10:55:37.621: E/AndroidRuntime(941): at android.widget.ImageView.<init>(ImageView.java:114)03-29 10:55:37.621: E/AndroidRuntime(941): at android.widget.ImageView.<init>(ImageView.java:110)03-29 10:55:37.621: E/AndroidRuntime(941): ... 27 more\[/code\]Can someone help me to avoid this error
 
Back
Top