构建 apk 时出错。谁收到此错误。我该如何修复此错误?
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> java.lang.OutOfMemoryError (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
你能尝试一下吗android:largeHeap="true"
在你的manifest.xml中还要检查你是否正在使用以下命令将大尺寸图像直接加载到xml imageView中src
or app:srcCompat
如果你可以使用像 Glide 这样的库https://github.com/bumptech/glide https://github.com/bumptech/glide为了实现这一点
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)