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. Dismiss Notice

CommandInvokationFailure: Android Asset Packaging Tool failed (No stderr to lookup)

Discussion in 'Android' started by Nezix, Oct 18, 2014.

  1. Trungdv

    Trungdv

    Joined:
    Dec 1, 2012
    Posts:
    22
  2. GDesmoulins

    GDesmoulins

    Joined:
    Apr 26, 2013
    Posts:
    7
    Hello, for me, the problem was in "android-support-v5.jar" files added in Plugins/Android folder... maybe this could help someone ?
     
  3. darkhus

    darkhus

    Joined:
    Nov 30, 2012
    Posts:
    17
    I had same problem... it's sloved now, what I done is:
    - installed the newest sdk-build-tools (I got all of them, from 20 to 23.0.2)
    - check if there are no two AndroidManifest.xml files
    - my problem start when I include GoogleMobileAdsPlugin from their site as Unity package. Together with package there was file "project.properties", I deleted it and it worked. So you can check your files inside plugins folder...

    hope this will help someone...
     
  4. mennowillems

    mennowillems

    Joined:
    May 26, 2016
    Posts:
    1
    YES this one works, on win 10
     
  5. archan8

    archan8

    Joined:
    Jul 19, 2016
    Posts:
    1
    I'm New To unity please help me.........

    Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
    E:\Android\android-sdk\build-tools\24.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "E:/Android/android-sdk\platforms\android-24\android.jar" -F bin/resources.ap_ --extra-packages com.oculus.Integration:com.ArchGames.ballarena -S "C:\Users\hotar\Documents\ball arena\Temp\StagingArea\android-libraries\ovrplugin\res" -S "C:\Users\hotar\Documents\ball arena\Temp\StagingArea\android-libraries\unity-android-resources\res"

    stderr[
    invalid resource directory name: C:\Users\hotar\Documents\ball arena\Temp\StagingArea\android-libraries\unity-android-resources\res Values
    ]
    stdout[

    ]
     

    Attached Files:

    • nw.jpg
      nw.jpg
      File size:
      276.7 KB
      Views:
      809
  6. Rohit-Joshi

    Rohit-Joshi

    Joined:
    Apr 2, 2015
    Posts:
    15
    I am getting the same error. I recently updated SDK to version 26.


    CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
    C:/Program Files/Java/jdk1.8.0_121\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/rohit/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

    stderr[
    Error:Invalid command android
    ]
    stdout[

    ]
    exit code: 64
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
     
  7. drhmiri

    drhmiri

    Joined:
    Jun 17, 2014
    Posts:
    82
    Hi there, Thanks to your post, I know exactly what my problem is, because this error was caused after I replaced the content of my StreamingAssets. But I have no way of locating the special char that is causing the error. What was your cuprit special char? How do I go about figuring out what the cause is? Thank you...
     
  8. Squegy

    Squegy

    Joined:
    Aug 24, 2018
    Posts:
    2
    If your getting this:
    CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Java\jdk1.8.0_172\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=-Xmx4096m" "assembleRelease"


    Fix is: In the Build Settings/Build System change from gradle to internal it worked
     
  9. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    383
    For me, shutting down unity and restarting computer worked.
    Was getting this error with unity 2018.3.0f2