Android Studio Build Problems

Asked 2 years ago, Updated 2 years ago, 27 views

Hello, I'm a student who is developing an app with Android Studio. Before this, the time of gradle build didn't last very long. But I'm working on a project with Google Maps API, and I'm working on this project It takes at least 10 minutes for each build(Crying) I tried many ways through Google, but it didn't work out... Why are you doing this?

android

2022-09-22 20:46

1 Answers

It might not help if you've already been Googleing a lot. In my opinion, it seems that it is a problem such as repository or dependency rather than Google Maps.

Do you add a separate repository?

If there are many product Flavor and buildType, you need to reduce it.

mavenCentral >> jcenter

gradle.properties

org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx6096m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

org.gradle.configureondemand=true

Preferences > Build, Execution, Deployment > Gradle

When you create an APK, do not create all the APKs at once, but create only the necessary APKs to run the build faster.


2022-09-22 20:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.