摆脱Android Studio中的内存错误



我为圆形图像底部和kenburnsview库添加了cresentrocontainer,以使图像动画。之后,我摆脱了内存错误,Android Studio也变得非常慢。

您将拥有大图(也许是大的W.R.T您的当前设备在您正在测试的堆尺寸较低)中,您可以在XML中分配给视图。您可以降低图像,然后分配到programTictialy,以降低缩放,只需通过毕加索或GLID加载图像即可。另外,您可以在应用标签下的清单中进行Android:gromheap =" true",这显然是许多程序员建议的。

因为该库使用图像只需更新您的清单为

<application
    android:name=".MyApplication"
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="Mall"
    android:largeHeap="true"
    android:logo="@drawable/logo_for_up"
    android:screenOrientation="portrait"
    android:theme="@style/AppTheme" >
</application>

最新更新