Home » Android » android – Binary XML file line #2: Error inflating class <unknown>

android – Binary XML file line #2: Error inflating class <unknown>

Posted by: admin May 14, 2020 Leave a comment

Questions:

I am new to Android. Whenever I run app on emulator it say”Unfortunalty stopped” when I run and checked the ADT logs it says

05-01 15:43:26.597: E/dalvikvm-heap(1022): Out of memory on a 36864016-byte allocation.
05-01 15:43:26.687: W/dalvikvm(1022): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
05-01 15:43:26.817: E/AndroidRuntime(1022): FATAL EXCEPTION: main
05-01 15:43:26.817: E/AndroidRuntime(1022): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jaisri.myapp/com.jaisri.myapp.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.os.Looper.loop(Looper.java:137)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.app.ActivityThread.main(ActivityThread.java:5041)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at java.lang.reflect.Method.invokeNative(Native Method)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at java.lang.reflect.Method.invoke(Method.java:511)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at dalvik.system.NativeStart.main(Native Method)
05-01 15:43:26.817: E/AndroidRuntime(1022): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.createView(LayoutInflater.java:613)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:807)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:736)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.app.Activity.setContentView(Activity.java:1881)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at com.jaisri.myapp.MainActivity.onCreate(MainActivity.java:78)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.app.Activity.performCreate(Activity.java:5104)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
05-01 15:43:26.817: E/AndroidRuntime(1022):     ... 11 more
05-01 15:43:26.817: E/AndroidRuntime(1022): Caused by: java.lang.reflect.InvocationTargetException
05-01 15:43:26.817: E/AndroidRuntime(1022):     at java.lang.reflect.Constructor.constructNative(Native Method)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.LayoutInflater.createView(LayoutInflater.java:587)
05-01 15:43:26.817: E/AndroidRuntime(1022):     ... 26 more
05-01 15:43:26.817: E/AndroidRuntime(1022): Caused by: java.lang.OutOfMemoryError
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:355)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:785)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.content.res.Resources.loadDrawable(Resources.java:1965)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.View.<init>(View.java:3330)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.view.ViewGroup.<init>(ViewGroup.java:431)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.widget.LinearLayout.<init>(LinearLayout.java:176)
05-01 15:43:26.817: E/AndroidRuntime(1022):     at android.widget.LinearLayout.<init>(LinearLayout.java:172)
05-01 15:43:26.817: E/AndroidRuntime(1022):     ... 29 more
05-01 15:45:58.767: W/lenght(1085): 1
05-01 15:46:03.977: E/dalvikvm-heap(1085): Out of memory on a 36864016-byte allocation.
05-01 15:46:04.237: W/dalvikvm(1085): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
05-01 15:46:04.548: E/AndroidRuntime(1085): FATAL EXCEPTION: main
05-01 15:46:04.548: E/AndroidRuntime(1085): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jaisri.myapp/com.jaisri.myapp.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.os.Looper.loop(Looper.java:137)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.app.ActivityThread.main(ActivityThread.java:5041)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at java.lang.reflect.Method.invokeNative(Native Method)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at java.lang.reflect.Method.invoke(Method.java:511)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at dalvik.system.NativeStart.main(Native Method)
05-01 15:46:04.548: E/AndroidRuntime(1085): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.createView(LayoutInflater.java:613)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:807)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:736)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.app.Activity.setContentView(Activity.java:1881)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at com.jaisri.myapp.MainActivity.onCreate(MainActivity.java:78)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.app.Activity.performCreate(Activity.java:5104)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
05-01 15:46:04.548: E/AndroidRuntime(1085):     ... 11 more
05-01 15:46:04.548: E/AndroidRuntime(1085): Caused by: java.lang.reflect.InvocationTargetException
05-01 15:46:04.548: E/AndroidRuntime(1085):     at java.lang.reflect.Constructor.constructNative(Native Method)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.LayoutInflater.createView(LayoutInflater.java:587)
05-01 15:46:04.548: E/AndroidRuntime(1085):     ... 26 more
05-01 15:46:04.548: E/AndroidRuntime(1085): Caused by: java.lang.OutOfMemoryError
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:355)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:785)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.content.res.Resources.loadDrawable(Resources.java:1965)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.View.<init>(View.java:3330)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.view.ViewGroup.<init>(ViewGroup.java:431)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.widget.LinearLayout.<init>(LinearLayout.java:176)
05-01 15:46:04.548: E/AndroidRuntime(1085):     at android.widget.LinearLayout.<init>(LinearLayout.java:172)
05-01 15:46:04.548: E/AndroidRuntime(1085):     ... 29 more
05-01 15:46:21.367: E/Trace(1130): error opening trace file: No such file or directory 

Please help me . wher should I check the problem. I am not getting it.

Here is the xml layout

<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:background="#FF5D00" >
<RelativeLayout
android:id="@+id/jkheading"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_alignParentTop="true"
android:background="@drawable/jkhead" >
<ImageView
android:id="@+id/jkheadingtext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_toLeftOf="@+id/search"
android:src="@drawable/header" />
<ImageButton
android:id="@+id/search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@android:color/transparent"
android:src="@android:drawable/ic_menu_search" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/jksearch"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_alignParentTop="true"
android:background="@drawable/jkhead" >
<EditText
android:id="@+id/jkedit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="5dp"
android:layout_toLeftOf="@+id/search1"
android:hint="Search"
android:textColor="@android:color/black" />
<ImageButton
android:id="@+id/search1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@android:color/transparent"
android:src="@drawable/jksearch" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/jkrunn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/jkheading"
android:layout_marginTop="3dp"
android:background="#FFAF00" >
<TextView
android:id="@+id/jkruntext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="Welcome"
android:textColor="@android:color/white" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/jkrunn1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/jkrunn"
android:layout_marginTop="3dp"
android:background="#FFAF00" >
<com.jaisri.jklinks.Scrolltext
android:id="@+id/jkruntext1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Welcome"
android:textColor="@android:color/white" >
</com.jaisri.jklinks.Scrolltext>
</RelativeLayout>
<ViewFlipper
android:id="@+id/viewFlipper1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/jkheading"
android:layout_centerHorizontal="true" >
<include
android:id="@+id/firstlayout"
layout="@layout/flip9" />
<include
android:id="@+id/listlayout"
layout="@layout/flip8" />
<include
android:id="@+id/listlayout1"
layout="@layout/flip7" />
<include
android:id="@+id/listlayout2"
layout="@layout/flip6" />
</ViewFlipper>
<RelativeLayout
android:id="@+id/slider"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_above="@+id/jkfooter"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/jkrunn1"
android:layout_centerHorizontal="true"
android:background="@drawable/glasseffect" >
<ImageButton
android:id="@+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="@android:color/transparent"
android:src="@drawable/face" />
<ImageButton
android:id="@+id/jklike"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button2"
android:layout_centerHorizontal="true"
android:background="@android:color/transparent"
android:src="@drawable/like" />
<ImageButton
android:id="@+id/register"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:background="@android:color/transparent"
android:src="@drawable/login2" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/register1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/jkheading"
android:background="@drawable/jklogin" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Login"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView1"
android:layout_marginLeft="18dp"
android:layout_marginTop="15dp"
android:text="Username" />
<EditText
android:id="@+id/signinusername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:ems="10" >
<requestFocus />
</EditText>
<EditText
android:id="@+id/signinpassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/signinusername"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:ems="10"
android:inputType="textPassword" />
<Button
android:id="@+id/jksignin"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/textView2"
android:layout_below="@+id/signinpassword"
android:layout_marginTop="15dp"
android:background="@drawable/iconback"
android:text="Enter"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView2"
android:layout_below="@+id/signinusername"
android:text="Password" />
<Button
android:id="@+id/signup"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/jksignin"
android:layout_alignBottom="@+id/jksignin"
android:layout_alignRight="@+id/textView1"
android:background="@drawable/iconback"
android:text="  Signup  "
android:textColor="@android:color/white" />
<Button
android:id="@+id/close"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/signup"
android:layout_alignBottom="@+id/signup"
android:layout_alignParentRight="true"
android:layout_marginRight="38dp"
android:background="@drawable/iconback"
android:text="Exit"
android:textColor="@android:color/white" />
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/register2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/jkheading"
android:background="@drawable/jklogin" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Register"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView1"
android:layout_marginLeft="18dp"
android:layout_marginTop="0dp"
android:text="Email-id" />
<EditText
android:id="@+id/signupemail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:ems="10" >
<requestFocus />
</EditText>
<EditText
android:id="@+id/signupusername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/signupemail"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:ems="10" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView2"
android:layout_below="@+id/signupemail"
android:text="Username" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView2"
android:layout_below="@+id/signupusername"
android:text="Password" />
<EditText
android:id="@+id/signuppassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/signupusername"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:ems="10"
android:inputType="textPassword" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView2"
android:layout_below="@+id/signuppassword"
android:text="Confirm Password" />
<EditText
android:id="@+id/signuppassword2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/signuppassword"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:ems="10"
android:inputType="textPassword" />
<Button
android:id="@+id/Jksignup"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/signuppassword2"
android:layout_marginTop="15dp"
android:layout_toLeftOf="@+id/textView1"
android:background="@drawable/iconback"
android:text=" Sign Up "
android:textColor="@android:color/white" />
<Button
android:id="@+id/close1"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/signuppassword2"
android:layout_marginLeft="22dp"
android:layout_marginTop="15dp"
android:layout_toRightOf="@+id/textView1"
android:background="@drawable/iconback"
android:text="Exit"
android:textColor="@android:color/white" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/jkfooter"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:background="@drawable/jkfoot" >
<TextView
android:id="@+id/jkadv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Your Ad Image Here "
android:textColor="@android:color/white" />
</RelativeLayout>
<ImageButton
android:id="@+id/slide"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginRight="-8dp"
android:background="@android:color/transparent"
android:src="@drawable/sideopen" />
<ImageButton
android:id="@+id/slide1"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="-8dp"
android:layout_toLeftOf="@+id/slider"
android:background="@android:color/transparent"
android:src="@drawable/sideclose" />
</RelativeLayout>

Thanks alot

How to&Answers:

If you examine the Caused by: lines, it looks like the root cause is an OutOfMemoryError that’s occurring in BitmapFactory.nativeDecodeAsset(). (Note also the references to “Out of memory on a 36864016-byte allocation”).

Are you trying to include a very large image file in your layout somewhere?

Answer:

Just for future people having this issue you can add in manifest:

android:largeHeap="true" 

this fixed the issue for me.

Answer:

I think the problem is that your xml class definition doesn’t match the package you have in your custom class. Assuming it is correct in your class, try changing the xml to

 <com.jaisri.myapp.Scrolltext android:id="@+id/jkruntext1" 

I haven’t used custom Views much but I’m pretty sure this is a problem. Hope this helps