10

我是安卓新手。每当我在模拟器上运行应用程序时,当我运行并检查它说的 ADT 日志时,它会说“不幸停止”

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 

请帮我 。我应该在哪里检查问题。我不明白。

这是xml布局

<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>

非常感谢

4

4 回答 4

29

如果您检查这些Caused by:行,看起来根本原因是OutOfMemoryError发生在BitmapFactory.nativeDecodeAsset(). (另请注意对“36864016 字节分配内存不足”的引用)。

您是否试图在布局中的某个地方包含一个非常大的图像文件?

于 2013-05-01T15:58:55.733 回答
6

只是为了将来有这个问题的人,你可以在清单中添加:

android:largeHeap="true"

这为我解决了这个问题。

于 2016-09-01T19:01:31.757 回答
4

我认为问题在于您的 xml 类定义与您在自定义类中的包不匹配。假设它在您的课程中是正确的,请尝试将 xml 更改为

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

我没有Views太多使用自定义,但我很确定这是一个问题。希望这可以帮助

于 2013-05-01T19:54:41.907 回答
0

在我的情况下,我在 api 5 和 6 上遇到了同样的错误。发现我正在使用some.xml位于文件夹下的一些drawable-24。因此,单击删除come.xmlto drawablehappy days 错误后就消失了。项目 -> 应用程序 -> res -> (检查 drawable-24 find usages

于 2021-02-15T17:23:09.547 回答