Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UCB Gradle try to move classes.jar in licence.aar file

Discussion in 'Unity Build Automation' started by TobyKaos, Mar 19, 2018.

  1. TobyKaos

    TobyKaos

    Joined:
    Mar 4, 2015
    Posts:
    214
    Hello,

    When I try to build with UCB and Unity 2017_3_1f1 (same with 5.6.5f1) and using gradle I have this error:

    EXCEPTION: IOException: Failed to Move File / Directory from 'Temp/StagingArea/android-libraries/com.google.android.gms.play-services-analytics-impl-license-11.8.0/classes.jar' to 'Temp/StagingArea/android-libraries/com.google.android.gms.play-services-analytics-impl-license-11.8.0/libs/classes.jar'

    Then indeed this file does not contains classes.jar file.
    If I build locally all is ok.

    Why UCB should not try to move this file. Must only move in play-services-analytics-11.8.0.aar . Not for the licence files.
     
    Qbit86 likes this.
  2. alan_motionlab

    alan_motionlab

    Joined:
    Nov 27, 2014
    Posts:
    99
    I get this all the time with Android builds since I started using Gradle - never worked and not really found a solution for it when asked about it... had to build manually instead
     
  3. alan_motionlab

    alan_motionlab

    Joined:
    Nov 27, 2014
    Posts:
    99
    Adding to this - I get the following error on Cloud building on 2017.2.2p1 (but had it on several previous Unity versions since Gradle was supported)

    Code (csharp):
    1.  
    2. 14644: [Unity] DisplayProgressbar: Processing AAR plugins
    3. 14645: [Unity] EXCEPTION: IOException: Failed to Move File / Directory from 'Temp/StagingArea/android-libraries/com.google.android.gms.play-services-ads-license-11.6.2/classes.jar' to 'Temp/StagingArea/android-libraries/com.google.android.gms.play-services-ads-license-11.6.2/libs/classes.jar'.
    4. 14646: [Unity] UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    5. 14647: [Unity] UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    6. 14648: [Unity] UnityEngine.Logger:Log(LogType, Object)
    7. 14649: [Unity] UnityEngine.Debug:Log(Object)
    8. 14650: [Unity] UnityEditor.CloudBuild.BuildLogger:Log(String)
    9. 14651: [Unity] UnityEditor.CloudBuild.BuildLogger:HighlightUnityErrors(String, String, LogType)
    10. 14652: [Unity] UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
    11. 14653: [Unity] UnityEditor.CloudBuild.Builder:Build()
    12. 14654: [Unity] IOException: Failed to Move File / Directory from 'Temp/StagingArea/android-libraries/com.google.android.gms.play-services-ads-license-11.6.2/classes.jar' to 'Temp/StagingArea/android-libraries/com.google.android.gms.play-services-ads-license-11.6.2/libs/classes.jar'.
    I've seen it be caused by other jar files as well, jot just ads-licence... I'd have to have a dig to find them
     
    Qbit86 likes this.
  4. TobyKaos

    TobyKaos

    Joined:
    Mar 4, 2015
    Posts:
    214
    Found a solution after using JarResolver that added licence file. Simply delete them and all is fine
     
  5. alan_motionlab

    alan_motionlab

    Joined:
    Nov 27, 2014
    Posts:
    99
    ah, so the licence files aren't needed at all are they? I don't know much about Android, just know enough to get by.... I can build/release with just the main .aar files?