Android java.lang.OutOfMemoryError:无法分配2359308字节的分配,其中包含224532个可用字节和219KB的内存
我的登录页面中出现错误。在清单文件应用程序标记中声明后:Android java.lang.OutOfMemoryError:无法分配2359308字节的分配,其中包含224532个可用字节和219KB的内存,android,out-of-memory,android-imageview,Android,Out Of Memory,Android Imageview,我的登录页面中出现错误。在清单文件应用程序标记中声明后: <application android:hardwareAccelerated="false" android:largeHeap="true"/> 尝试文件-->使缓存无效/重新启动。您在java代码中做了什么?您可能会喜欢。 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schema
<application
android:hardwareAccelerated="false"
android:largeHeap="true"/>
尝试
文件-->使缓存无效/重新启动。您在java代码中做了什么?您可能会喜欢。
<?xml version="1.0" encoding="utf-8"?>
<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"
tools:context="com.zala.sanklappreschool.Advertisement">
<android.support.v4.view.ViewPager
android:id="@+id/adv_view_pager"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_alignWithParentIfMissing="true">
<com.zala.sanklappreschool.CirclePageIndicator
android:id="@+id/adv_view_pager_indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:gravity="center_vertical"/>
</android.support.v4.view.ViewPager>
<!-- <TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tvreg"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tvBranch"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tvyer"/>-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:id="@+id/rlHome"
android:layout_weight="0.65"
android:background="@color/red">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@drawable/ic_home"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:padding="8dp"
android:layout_centerHorizontal="true"
android:id="@+id/imgHome"
android:tint="@color/white"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Home"
android:layout_below="@+id/imgHome"
android:layout_centerHorizontal="true"
android:textSize="14sp"
android:textColor="@color/white"/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.65"
android:background="@color/yellow_dark"
android:id="@+id/rlAbout">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@drawable/ic_about"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:padding="8dp"
android:layout_centerHorizontal="true"
android:id="@+id/imgAbout"
android:tint="@color/white"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="About Us"
android:layout_below="@+id/imgAbout"
android:layout_centerHorizontal="true"
android:textSize="14sp"
android:textColor="@color/white"/>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
</LinearLayout>