So our plugins run out of those 64K functions in DEX build, and now I try my hands on the gradle building but I thinks I’m missing some fundamental information how to do that.
Can someone please give me a step by step instructions how to make a build from editor to phone using gradle?
Environment:
OS X 10.11.6
Unity 5.5.2p3
javac 1.8.0_102
Android Studio 2.3
Android SDK Tools 25.2.5
Android SDK Platform-tools 25.0.4
Android SDK Build-tools 25.0.2
Android 7.1.1 (API 25)
Android Support Repository 47
Google Play services 39
Google Repository 45
Steps I managed to take this far:
- Made a project
- Installed too many plugins on it for Dalvik build
- Followed instructions from Unity - Manual: Gradle for Android
- Ran in the problems even with that
- Followed instructions to export the project.
- Installed gradle-3.4.1
- Added it to /etc/paths
- Ran gradle in the exported folder (where the build.gradle is) and got a following:
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
-
Where:
Build file ‘/Users/username/Desktop/Projects/android_test/Project01/build.gradle’ line: 20 -
What went wrong:
A problem occurred evaluating root project ‘Project01’.
Failed to apply plugin [id ‘com.android.application’]
Gradle version 2.10 is required. Current version is 3.4.1. If using the gradle wrapper, try editing the distributionUrl in /Users/username/Desktop/Projects/android_test/Project01/gradle/wrapper/gradle-wrapper.properties to gradle-2.10-all.zip
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.493 secs
So what did I do wrong and what I am missing?