Fixing Unity | CommandInvokationFailure: Failed to re-package resources

CommandInvokationFailure: Failed to re-package resources

Suddenly I saw an error while building the apk-file for my Unity project, which said: CommandInvokationFailure: Failed to re-package resources. Let’s see how to fix that.

 The full error message was:

CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\workspace\soft\android-sdk\build-tools\24.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/workspace/soft/android-sdk\platforms\android-23\android.jar" -F bin/resources.ap_

Fixing ‘Failed to re-package resources’ error

After some time spent in the web searching for a fix I found out that Unity needs the latest Build-Tools version to be installed. For the time when I spot this issue, the latest one was 24.0.1 and it was not installed. After the installation (I also installed the Android 7.0 packages) in the SDK Manager everything worked fine and the APK file was successfully generated.

failed to re-package unity android

Leave a Reply

Be the First to Comment!