Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Everyplay Android Gradle error

Discussion in 'Unity Everyplay' started by litebox, Jan 6, 2018.

  1. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    112
    Hi,
    I'm trying to build an empty Android apk with the latest Everyplay plugin imported from Asset Store. Unity 2017.3.0f3, OS X.
    When I try to use Grandle. I get next error:
    Code (csharp):
    1. CommandInvokationFailure: Gradle build failed.
    2. /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
    3.  
    4. stderr[
    5.  
    6. FAILURE: Build failed with an exception.
    7.  
    8. * Where:
    9. Build file '/Users/eugene/Documents/Unity/default/Temp/gradleOut/everyplay/build.gradle' line: 29
    10.  
    11. * What went wrong:
    12. Could not compile build file '/Users/eugene/Documents/Unity/default/Temp/gradleOut/everyplay/build.gradle'.
    13. > startup failed:
    14.   build file '/Users/eugene/Documents/Unity/default/Temp/gradleOut/everyplay/build.gradle': 29: Statement labels may not be used in build scripts.
    15.   In case you tried to configure a property named 'minSdkVersion', replace ':' with '=' or ' ', otherwise it will not have the desired effect.
    16.    @ line 29, column 24.
    17.              minSdkVersion: 16
    18.                             ^
    19.  
    20.   1 error
    21.  
    22.  
    23. * Try:
    24. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    25.  
    26. BUILD FAILED in 0s
    27.  
    I still able to build with Internal Build System, but this is not an option for me.

    I use Android API Level 25, and next SDK Tools:
    Screenshot 2018-01-06 18.26.05.png
     
  2. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    112
    Found a workoround, replaced this part of build.gradle:
    Code (CSharp):
    1. compileSdkVersion 23
    2. buildToolsVersion "23.0.1"
    3. defaultPublishConfig "release"
    4.  
    5. defaultConfig {
    6. versionCode 1590
    7. versionName "1.5.9"
    8. }
    to this one:
    Code (CSharp):
    1. compileSdkVersion 25
    2. buildToolsVersion "25.0.3"
    3. defaultPublishConfig "release"
    4.  
    5. defaultConfig {
    6. versionCode 1590
    7. versionName "1.5.9"
    8. }
    First of all, have to delete colon symbol (minSdkVersion: 16). After this I got error:
    Code (CSharp):
    1. The SDK Build Tools revision (23.0.1) is too low for project ':everyplay'. Minimum required is 25.0.0
    So I have to change SDK/Tools Version from 23 to 25.
     
  3. isoPepe

    isoPepe

    Unity Technologies

    Joined:
    Jan 26, 2017
    Posts:
    6
    Yes, there is typo in current gradle file, which is fixed in next release.
    Build tools update requirements comes from gradle upgrade in 2017.3 Unity, we will update Everyplay gradle file to 25.x buildtools in next release too.
     
    litebox likes this.
  4. PeterPP

    PeterPP

    Joined:
    Jun 23, 2014
    Posts:
    2
    When we should expect the release? It is quite a long time.