Search Unity

CommandInvokationFailure: Gradle build failed.

Discussion in 'Editor & General Support' started by Xavier78, Jun 25, 2017.

Thread Status:
Not open for further replies.
  1. Xavier78

    Xavier78

    Joined:
    Oct 13, 2013
    Posts:
    41
    Here is the error


    CommandInvokationFailure: Gradle build failed.
    C:/Program Files/Java/jdk1.8.0_112\bin\java.exe -classpath "E:\Program\Unity 5.6.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleRelease"

    stderr[
    C:\New folder\PlatformVR2\Temp\gradleOut\build\intermediates\manifests\full\release\AndroidManifest.xml:17:24-40: AAPT: No resource found that matches the given name (at 'label' with value '@String/app_name').


    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':processReleaseResources'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\New folder\sdk-tools-windows-3859397\build-tools\26.0.0\aapt.exe'' finished with non-zero exit value 1

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    ]
    stdout[
    Incremental java compilation is an incubating feature.
    :preBuild UP-TO-DATE
    :preReleaseBuild UP-TO-DATE
    :checkReleaseManifest
    :preDebugBuild UP-TO-DATE
    :prepareOVRPluginLibrary UP-TO-DATE
    :prepareReleaseDependencies
    :compileReleaseAidl UP-TO-DATE
    :compileReleaseRenderscript UP-TO-DATE
    :generateReleaseBuildConfig UP-TO-DATE
    :mergeReleaseShaders UP-TO-DATE
    :compileReleaseShaders UP-TO-DATE
    :generateReleaseAssets UP-TO-DATE
    :mergeReleaseAssets
    :generateReleaseResValues UP-TO-DATE
    :generateReleaseResources UP-TO-DATE
    :mergeReleaseResources UP-TO-DATE
    :processReleaseManifest UP-TO-DATE
    :processReleaseResources FAILED

    BUILD FAILED

    Total time: 13.054 secs
    ]
    exit code: 1
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress)
    UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, UnityEditor.Android.Progress progress)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.HostView:OnGUI()
    here is my AndroidManifest

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.oculus.Integration" android:versionName="1.2" android:versionCode="1">
    <application android:icon="@drawable/app_icon" android:label="@String/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:debuggable="false">
    <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
    </application>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <activity android:name="com.unity3d.player.UnityPlayerActivity"
    android:label="@String/app_name">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    </activity>
    </manifest>
    I read that you need to set app_name in strings.xml under /res but I have no clue where /res/value is in the project(I added it to all /res/value files I could find), which here is that code.

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    <string name="app_name">PlatformVR</string>
    </resources>

    Sorry for any wrong formatting, I have never posted here in the forums.
     
    Kudorado and chuck666 like this.
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    I think you should use @String/app_name (lowercase s)
     
  3. chuck666

    chuck666

    Joined:
    Sep 29, 2016
    Posts:
    6
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    @chuck666 what is the exact error you are getting ?
     
  5. teexiii

    teexiii

    Joined:
    Oct 7, 2015
    Posts:
    15
    any fixes yet guys?
     
    PsijicNine likes this.
  6. macdonaldcalumj

    macdonaldcalumj

    Joined:
    May 4, 2017
    Posts:
    1
    I was having similar issues (on macOS rather than Windows however) today and what solved it for me was changing the JDK version in External Tools. It had automatically selected 1.7 despite me having 1.8 installed, so I set it to the most recent version and everything built fine.
     
    zchek and AussieBuyer like this.
  7. Aamna111

    Aamna111

    Joined:
    Feb 15, 2018
    Posts:
    1
    I downloaded Google VR SDK and tried to build the demo scene named "hello vr". I am using JDK 1.8 and Unity 2017.3.0f3, I am still getting this error. I tried with JDK 1.9 as well but there is no improvement. Please help.
     
  8. DesignerE

    DesignerE

    Joined:
    Feb 26, 2018
    Posts:
    1
    that true.
     
  9. bond11

    bond11

    Joined:
    Apr 6, 2016
    Posts:
    1
    any news guys
     
    PsijicNine likes this.
  10. lasherbak

    lasherbak

    Joined:
    Feb 28, 2018
    Posts:
    1
    I was able to fix the "Gradle build failed" error by installing older Java version - (Java SE Development Kit 8u161) and updating the pathway in Unity Preferneces>External tools> JDK to the older Java.
     
    hawkyjl and miaoPao like this.
  11. shrutisinghcse056

    shrutisinghcse056

    Joined:
    Mar 10, 2018
    Posts:
    3
    • erroUnity.PNG I am not able to build apk. Please help me to come out to this problem.
     
  12. LLBean25

    LLBean25

    Joined:
    Oct 3, 2017
    Posts:
    1
    HeLinChooi and miaoPao like this.
  13. dick

    dick

    Joined:
    Sep 6, 2014
    Posts:
    91
    Screen Shot 2018-03-11 at 4.32.03 PM.png Screen Shot 2018-03-11 at 4.32.03 PM.png I am using JDK 8 (Java SE Development Kit 8u161) and i am still getting grade build error please help!
     
  14. muratti32

    muratti32

    Joined:
    Mar 26, 2016
    Posts:
    1
    I had the same problem and solved in the following way. My problem is install the last Android SDK Build Tools 28 RC1 after uninstall problem solved.

    update.jpg
     
  15. Sylker

    Sylker

    Joined:
    Sep 22, 2012
    Posts:
    22
    @muratti32 you saved me! Was stuck on this for far too long. Tried all kinds of solutions. Thanks!
     
  16. einaruvsloekk

    einaruvsloekk

    Joined:
    Mar 21, 2018
    Posts:
    2
    hey guys!
    I have the same problem, and i can't fix it...
    I tried doing what @muratti32 said, but it still doesn't work.
    Any suggestions? Uten navn.png Uten navn2.png
     
  17. Alef_Ribeiro

    Alef_Ribeiro

    Joined:
    May 11, 2015
    Posts:
    5
    upload_2018-3-21_14-32-6.png

    I was having the same problem when I saw that I did not have NDK, I downloaded it and I'm testing it, if it works, I'll return the result to you
     
  18. Alef_Ribeiro

    Alef_Ribeiro

    Joined:
    May 11, 2015
    Posts:
    5
    CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Java\jdk1.8.0_121\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'gradleOut'.
    > The SDK Build Tools revision (23.0.3) is too low for project 'gradleOut'. Minimum required is 25.0.0

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED in 5s
    ]
    stdout[
    NDK is missing a "platforms" directory.
    If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Android\sdk\ndk-bundle.
    If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error)
    UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()


    ... No, it did not work.
     
  19. Alef_Ribeiro

    Alef_Ribeiro

    Joined:
    May 11, 2015
    Posts:
    5
    upload_2018-3-21_14-38-56.png
    Okay, it worked, switch from Gradle to Internal
     
  20. einaruvsloekk

    einaruvsloekk

    Joined:
    Mar 21, 2018
    Posts:
    2
    @Alef_Ribeiro yeah, that works. but then you won't be able to export project into android studio...
    There should be a solution for this...
    (Edit: it didn't work that way for me either.. "failed to assign APK")
     
    Last edited: Mar 21, 2018
  21. kabenjam

    kabenjam

    Joined:
    Feb 2, 2018
    Posts:
    1
    Hey man, could you get it to run on an Android Device with the Internal build?
     
    PsijicNine and wafer23 like this.
  22. lai32290

    lai32290

    Joined:
    Apr 2, 2016
    Posts:
    6
    Thanks man! you just saved my life!! it's working to me.
     
  23. rohitmpaul

    rohitmpaul

    Joined:
    Apr 19, 2018
    Posts:
    2
    None of the solutions is working for me.
    Am having the same error messages as the dick guy.
     
    PsijicNine and devild98 like this.
  24. sayginformation

    sayginformation

    Joined:
    Apr 8, 2018
    Posts:
    1
    did you solve this problem?
     
  25. rohitmpaul

    rohitmpaul

    Joined:
    Apr 19, 2018
    Posts:
    2
    Yes as per dick's instruction I changed the Buid from Gradle to internal now its working for me.☺☺
     
    unity_O79QHFZOQObZXQ and dick like this.
  26. tpaddock

    tpaddock

    Joined:
    Jun 16, 2017
    Posts:
    9
  27. sulanhava

    sulanhava

    Joined:
    Mar 4, 2018
    Posts:
    4
    Tryed everything and it didnt work. I have no idea why unity have a support, if they aint help.
     
    PsijicNine and Xylitogum like this.
  28. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    @sulanhava please PM me, or check out the link in my signature.
     
  29. mandev

    mandev

    Joined:
    Sep 5, 2012
    Posts:
    3
  30. unity_OWzFUJQKZ_tS3w

    unity_OWzFUJQKZ_tS3w

    Joined:
    Jan 2, 2018
    Posts:
    1
    @muratti32 Thanks. Your solution worked for me.
     
  31. VVayToyek

    VVayToyek

    Joined:
    Nov 16, 2016
    Posts:
    1
    it worked!ty
     
  32. Premkr

    Premkr

    Joined:
    May 25, 2018
    Posts:
    1
    In my android studio 28RC1 was not installed also 27.0.3. I installed 27.0.3 then it worked for me
     
  33. Sabmos

    Sabmos

    Joined:
    May 26, 2018
    Posts:
    2
    @muratti32
    Thanks so much!! This solution worked for me. For anyone else struggling, I am using SDK Build-Tools 27.0.3.
    Good luck everyone!
     
    BWILL likes this.
  34. BWILL

    BWILL

    Joined:
    May 26, 2013
    Posts:
    3
    HEY GUYS THIS FINALLY WORKED FOR ME!!
    Im using Android SDK Build-Tools 27.0.3 and JDK 1.8.0
    My version of Unity is the latest for the time, 2018.2.0f2
    I also did an Internal build instead of a Gradle.
    Even though there are newer versions of the Android SDK and JDK available, these older ones im using are the ones that work.


    Thanks to the guys in this thread, and to a bit of random luck. Goodluck to everyone else.
     
  35. abu100

    abu100

    Joined:
    Jun 15, 2015
    Posts:
    2
    were you able to solve this issue?
     
  36. Alphapac

    Alphapac

    Joined:
    Oct 24, 2015
    Posts:
    1
    Thanks buddy, it works for me :D
     
  37. miaoPao

    miaoPao

    Joined:
    Apr 22, 2018
    Posts:
    1
  38. kamleshsahaj

    kamleshsahaj

    Joined:
    Aug 15, 2018
    Posts:
    1
     
  39. 3vgen

    3vgen

    Joined:
    Mar 29, 2016
    Posts:
    2
    I uninstall all version of 'SDK build-tools', and than I install 27.0.3 version only. And now building projects is OK.:)
     
  40. SundayBalla

    SundayBalla

    Joined:
    Sep 22, 2018
    Posts:
    1
    This worked for me
     
    Leo_Jarvis likes this.
  41. Abdul_M

    Abdul_M

    Joined:
    Feb 17, 2018
    Posts:
    11
    I had the same issue, just delete the core 1.4 ( mine was the ar core 1.4 I put into my plugins). that fold collides with the manifest and causes it to crash.
     
  42. GreeneMachine

    GreeneMachine

    Joined:
    Jul 3, 2015
    Posts:
    126
    Had these issues.. and followed all the above. Still did not fix it.

    My problem was the path that Unity auto filled in Preferences when picking up my Android SDK. It used:

    \Users\<name>\AppData\Local\Android\sdk

    .. so when building it was looking for this path inside the folder where I was outputting the build.

    Once I changed it to

    C:\Users\<name>\AppData\Local\Android\sdk

    All worked.

    Just in case anyone else is having similar
    Cheers
     
  43. prokaryoticdrink

    prokaryoticdrink

    Joined:
    Oct 5, 2018
    Posts:
    1
    CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Java\jdk1.8.0_181\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'gradleOut'.
    > No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 6s
    ]
    stdout[

    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    //
    Can anyone help me on fixing this error
     
  44. GreeneMachine

    GreeneMachine

    Joined:
    Jul 3, 2015
    Posts:
    126
    What is your Backend Scripting set to in the build player settings?
    As far as I know, IL2CPP needs NDK installed, but Mono does not.
     
  45. Yuki1521

    Yuki1521

    Joined:
    Jul 22, 2017
    Posts:
    1
    You saved me !!!!!!! Thanks!!!!
     
  46. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    You have some manifest of some android library in your project that references this resource: integer/google_play_services_version

    This is not possible when building via Gradle (see the "Gradle troubleshooting" page in the docs for more info).
     
  47. marwanelkaouri

    marwanelkaouri

    Joined:
    Apr 30, 2018
    Posts:
    4
    i switched from gardle to interal but the same error ???
     
  48. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    @marwanelkaouri can you post your full error message ?
    In case you cannot solve the issue yourself, feel free to contact me privately via the link in my signature below.
     
    Last edited: Nov 23, 2018
  49. MihaMarn

    MihaMarn

    Joined:
    Nov 6, 2017
    Posts:
    15
    Please help. Similar here but with this error:

    CommandInvokationFailure: Gradle build failed.
    G:\M.2saved\PROGSI\NEWunity2017.4\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "G:\M.2saved\PROGSI\NEWunity2017.4\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':processReleaseResources'.
    > Android resource linking failed
    Output: G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml:12: error: unexpected element <requestedExecutionLevel> found in <manifest>.

    Command: C:\Users\Asus\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\643a5465c86abc2e3d896dd4c8e9cf7f\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\
    C:\Users\Asus\AppData\Local\Android\sdk\platforms\android-26\android.jar\
    --manifest\
    G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml\
    -o\
    G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\processed_res\release\processReleaseResources\out\resources-release.ap_\
    -R\
    @G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\incremental\processReleaseResources\resources-list-for-resources-release.ap_.txt\
    --auto-add-overlay\
    --java\
    G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\generated\not_namespaced_r_class_sources\release\processReleaseResources\r\
    --custom-package\
    com.Beta.s2pMB\
    -0\
    apk\
    -0\
    .unity3d\
    -0\
    .ress\
    -0\
    .resource\
    -0\
    .obb\
    -0\
    database.db\
    -0\
    fmsa_index\
    -0\
    mb_pdf_logo.jpg\
    --output-text-symbols\
    G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\symbols\release\R.txt\
    --no-version-vectors
    Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
    Output: G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml:12: AAPT: error: unexpected element <requestedExecutionLevel> found in <manifest>.

    Command: C:\Users\Asus\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\643a5465c86abc2e3d896dd4c8e9cf7f\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\
    C:\Users\Asus\AppData\Local\Android\sdk\platforms\android-26\android.jar\
    --manifest\
    G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml\
    -o\
    G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\processed_res\release\processReleaseResources\out\resources-release.ap_\
    -R\
    @G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\incremental\processReleaseResources\resources-list-for-resources-release.ap_.txt\
    --auto-add-overlay\
    --java\
    G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\generated\not_namespaced_r_class_sources\release\processReleaseResources\r\
    --custom-package\
    com.Beta.s2pMB\
    -0\
    apk\
    -0\
    .unity3d\
    -0\
    .ress\
    -0\
    .resource\
    -0\
    .obb\
    -0\
    database.db\
    -0\
    fmsa_index\
    -0\
    mb_pdf_logo.jpg\
    --output-text-symbols\
    G:\M.2saved\S2P\MUSCLEBOARD_versions\MB_Beta\trunk\Temp\gradleOut\build\intermediates\symbols\release\R.txt\
    --no-version-vectors
    Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 4s
    ]
    stdout[
    Observed package id 'tools' in inconsistent location 'C:\Users\Asus\AppData\Local\Android\sdk\tools-old' (Expected 'C:\Users\Asus\AppData\Local\Android\sdk\tools')
    Already observed package id 'tools' in 'C:\Users\Asus\AppData\Local\Android\sdk\tools'. Skipping duplicate at 'C:\Users\Asus\AppData\Local\Android\sdk\tools-old'
    :checkReleaseClasspath UP-TO-DATE
    :preBuild UP-TO-DATE
    :preReleaseBuild UP-TO-DATE
    :compileReleaseAidl NO-SOURCE
    :compileReleaseRenderscript UP-TO-DATE
    :checkReleaseManifest UP-TO-DATE
    :generateReleaseBuildConfig UP-TO-DATE
    :prepareLintJar UP-TO-DATE
    :mainApkListPersistenceRelease UP-TO-DATE
    :generateReleaseResValues UP-TO-DATE
    :generateReleaseResources UP-TO-DATE
    :mergeReleaseResources UP-TO-DATE
    :createReleaseCompatibleScreenManifests UP-TO-DATE
    :processReleaseManifest
    :splitsDiscoveryTaskRelease UP-TO-DATE
    :processReleaseResources FAILED
    13 actionable tasks: 2 executed, 11 up-to-date
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  50. MihaMarn

    MihaMarn

    Joined:
    Nov 6, 2017
    Posts:
    15
    Had similar problem. In error there was a line saying that at a specific path(assets/plugins/android) there is a xml that has an unexpected line that contain requestedExecutionLevel, so I just commented out that line like this: <!---<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> The xml needs to be there to handle my apps permissions to use bluetooth and other resorces (bluetooth does not work without that), so I left it there in plugins/android folder. Hope someone finds this helpfull.
     
    TypingMonk3y likes this.
Thread Status:
Not open for further replies.