5

Error while building apk.Who is getting this error.How can I fix this error?

 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.
3
  • what do you mean by "When I run android"? Do you mean you're launching Android Studio? Commented Nov 24, 2021 at 3:48
  • Error while building apk Commented Nov 24, 2021 at 3:51
  • See this Commented Nov 24, 2021 at 4:26

2 Answers 2

1

Could you try android:largeHeap="true" in your manifest.xml also check if you are loading an image with large size directly into xml imageView using src or app:srcCompat if that you can use library like Glide https://github.com/bumptech/glide to achieve that

Sign up to request clarification or add additional context in comments.

Comments

1

you should check if there is an open packager in the background, if yes, so close it and try to run again

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.