0
\$\begingroup\$

Can't build for Android, error log:

CommandInvokationFailure: Gradle build failed,

And this is in it's description:

Could not find com.android.tools.build:gradle:3.2.0.
\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

Some Gradle libraries were missing,

Instead of directly building apk, tried to "Export Project", then opened it in Android Studio.

It will start to download the requirements. After the required Gradle libraries are installed, try to build it in Android studio. Directly building apk files in Unity will work afterwards.

\$\endgroup\$
7
  • \$\begingroup\$ What if you're working offline, how can you manually install those dependencies? \$\endgroup\$ Commented Jun 17, 2019 at 4:30
  • 1
    \$\begingroup\$ @bluejayke try this: stackoverflow.com/a/50291708/1235063 \$\endgroup\$ Commented Jun 17, 2019 at 9:28
  • \$\begingroup\$ Interesting is there a way to do that without even Android studio? I downloaded the complete zip but how do I manually install it? \$\endgroup\$ Commented Jun 17, 2019 at 15:24
  • \$\begingroup\$ Use the same location in the answer above, but instead of opening Android Studio, open Unity. Check if it works. \$\endgroup\$ Commented Jun 18, 2019 at 16:25
  • \$\begingroup\$ What do you mean, where is there an option to select the full Gradle in unity \$\endgroup\$ Commented Jun 19, 2019 at 19:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .