Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Gradle Build Error - Tried everything but failed

Discussion in 'Android' started by jGate99, Jun 18, 2017.

  1. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,845
    Hi there,

    I'm trying to build android project since last 4-5 hours but failing miserably. I'm using Facebook SDK which now only supports Gradle based Build as well as UTNotifications.

    Please advise :(

    Code (CSharp):
    1.  
    2. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/Game/Library/Android/sdk/build-tools/26.0.0/aapt'' finished with non-zero exit value 1
    Console
    Code (CSharp):
    1. CommandInvokationFailure: Gradle build failed.
    2.         /usr/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleRelease"
    3.  
    4.         stderr[
    5.         /Volumes/BOOTCAMP/Projects/MacProjects/Unity3DProjects2017/Game/Temp/gradleOut/build/intermediates/res/merged/release/values/values.xml:162: AAPT: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.NoActionBar'.
    6.  
    7.         /Volumes/BOOTCAMP/Projects/MacProjects/Unity3DProjects2017/Game/Temp/gradleOut/build/intermediates/res/merged/release/values/values.xml:167: AAPT: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Dialog'.
    8.  
    9.  
    10.         FAILURE: Build failed with an exception.
    11.  
    12.         * What went wrong:
    13.         Execution failed for task ':processReleaseResources'.
    14.         > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/Games/Library/Android/sdk/build-tools/26.0.0/aapt'' finished with non-zero exit value 1
    15.  
    16.         * Try:
    17.         Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    18.         ]
    19.         stdout[
    20.         Incremental java compilation is an incubating feature.
    21.         :preBuild UP-TO-DATE
    22.         :preReleaseBuild UP-TO-DATE
    23.         :checkReleaseManifest
    24.         :preDebugBuild UP-TO-DATE
    25.         :prepareCommonLibrary UP-TO-DATE
    26.         :prepareFacebookAndroidSdk4230Library
    27.         :prepareFacebookAndroidWrapper7100Library
    28.         :prepareGoogleAIDLLibrary UP-TO-DATE
    29.         :prepareGooglePlayLibrary UP-TO-DATE
    30.         :preparePlayServicesBase1101Library UP-TO-DATE
    31.         :preparePlayServicesBasement1101Library UP-TO-DATE
    32.         :preparePlayServicesGcm1101Library UP-TO-DATE
    33.         :preparePlayServicesIid1101Library UP-TO-DATE
    34.         :preparePlayServicesTasks1101Library UP-TO-DATE
    35.         :prepareSupportCompat2600Alpha1Library UP-TO-DATE
    36.         :prepareSupportCoreUi2600Alpha1Library UP-TO-DATE
    37.         :prepareSupportCoreUtils2600Alpha1Library UP-TO-DATE
    38.         :prepareSupportFragment2600Alpha1Library UP-TO-DATE
    39.         :prepareSupportMediaCompat2600Alpha1Library UP-TO-DATE
    40.         :prepareSupportV42600Alpha1Library UP-TO-DATE
    41.         :prepareUnityAdsLibrary UP-TO-DATE
    42.         :prepareUtnotificationsLibrary UP-TO-DATE
    43.         :prepareReleaseDependencies
    44.         :compileReleaseAidl UP-TO-DATE
    45.         :compileReleaseRenderscript UP-TO-DATE
    46.         :generateReleaseBuildConfig UP-TO-DATE
    47.         :mergeReleaseShaders UP-TO-DATE
    48.         :compileReleaseShaders UP-TO-DATE
    49.         :generateReleaseAssets UP-TO-DATE
    50.         :mergeReleaseAssets
    51.         :generateReleaseResValues UP-TO-DATE
    52.         :generateReleaseResources UP-TO-DATE
    53.         :mergeReleaseResources
    54.         :processReleaseManifest
    55.         :processReleaseResources FAILED
    56.  
    57.         BUILD FAILED
    58.  
    59.         Total time: 28.274 secs
    60.         ]
    61.         exit code: 1
    62.         UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    63.         UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress)
    64.         UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, UnityEditor.Android.Progress progress)
    65.         UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    66.         UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    67.         UnityEditor.HostView:OnGUI()
    68.  
     
    Last edited: Jun 18, 2017
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Did you try building with the older ("internal") build system? does that work ?
     
    jGate99 likes this.
  3. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,845
    It was due to New FB SDK, solved now
     
  4. FVS

    FVS

    Joined:
    Aug 10, 2015
    Posts:
    56
    what went wrong with FB SDK? And how did you solve?
    Thanks
     
  5. Mihai_Anton

    Mihai_Anton

    Joined:
    May 31, 2013
    Posts:
    3
    I am having the same issue. Can you give us a more detailed answer to how you solved it, please?
    Thanks
     
  6. teexiii

    teexiii

    Joined:
    Oct 7, 2015
    Posts:
    15
    Any updates for the fixes guys?
     
  7. Sohrab19

    Sohrab19

    Joined:
    Jan 11, 2014
    Posts:
    2
    Any update?
     
  8. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    You are probably building using the wrong target android SDK
     
  9. robbycarter

    robbycarter

    Joined:
    Jan 28, 2017
    Posts:
    1
    How did you fix it?Please tell us
     
    Lio7Master likes this.
  10. joyjeba28

    joyjeba28

    Joined:
    Nov 30, 2015
    Posts:
    3
    This one solved for me. Thank you @liortal
     
  11. kornel-l-varga

    kornel-l-varga

    Joined:
    Jan 18, 2013
    Posts:
    43
    How mean that is.... saying yaaay I solved it and not sharing the solution.
    The internal system will not be solution for long, because it is going away...
     
  12. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,834
    Make sure you include com.android.support:appcompat-v7 in the dependencies.