Question by
nathanthesnooper · Sep 06, 2018 at 04:33 AM ·
androidbuildbuild-errorandroid buildlinux editor
Failed to re-package resources
I am trying to compile my project on Linux (Ubuntu) but I am getting this error.
It is an empty project.
Versions:
SDK Tools: 26.1.1
SDK Platform Tools: 28.0.1
SDK Build Tools: 28.0.2
Unity: 2018.2.6f1
OpenJDK: 1.8.0_171
`
CommandInvokationFailure: Failed to re-package resources.
/home/nathanfranke/Android/Sdk/build-tools/28.0.2/aapt package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "/home/nathanfranke/Android/Sdk/platforms/android-25/android.jar" -F bin/resources.ap_
stderr[
res/drawable-anydpi-v26/app_icon.xml:3: error: Error: No resource found that matches the given name (at 'drawable' with value '@drawable/ic_launcher_background').
res/drawable-anydpi-v26/app_icon.xml:4: error: Error: No resource found that matches the given name (at 'drawable' with value '@drawable/ic_launcher_foreground').
res/drawable-anydpi-v26/app_icon_round.xml:3: error: Error: No resource found that matches the given name (at 'drawable' with value '@drawable/ic_launcher_background').
res/drawable-anydpi-v26/app_icon_round.xml:4: error: Error: No resource found that matches the given name (at 'drawable' with value '@drawable/ic_launcher_foreground').
]
stdout[
Configurations:
(default)
v21
mdpi-v4
xhdpi-v4
anydpi-v26
Files:
drawable/app_banner.png
Src: (xhdpi-v4) res/drawable-xhdpi/app_banner.png
drawable/app_icon.png
Src: (mdpi-v4) res/drawable-mdpi/app_icon.png
drawable/app_icon.xml
Src: (anydpi-v26) res/drawable-anydpi-v26/app_icon.xml
drawable/app_icon_round.xml
Src: (anydpi-v26) res/drawable-anydpi-v26/app_icon_round.xml
mipmap/app_icon.png
Src: (mdpi-v4) res/mipmap-mdpi/app_icon.png
values/strings.xml
Src: () res/values/strings.xml
values/styles.xml
Src: () res/values/styles.xml
Src: (v21) res/values-v21/styles.xml
AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs:
Type drawable
drawable/app_banner.png
Src: (xhdpi-v4) res/drawable-xhdpi/app_banner.png
drawable/app_icon.png
Src: (mdpi-v4) res/drawable-mdpi/app_icon.png
drawable/app_icon.xml
Src: (anydpi-v26) res/drawable-anydpi-v26/app_icon.xml
drawable/app_icon_round.xml
Src: (anydpi-v26) res/drawable-anydpi-v26/app_icon_round.xml
Type mipmap
mipmap/app_icon.png
Src: (mdpi-v4) res/mipmap-mdpi/app_icon.png
Type values
values/strings.xml
Src: () res/values/strings.xml
values/styles.xml
Src: () res/values/styles.xml
Src: (v21) res/values-v21/styles.xml
Including resources from package: /home/nathanfranke/Android/Sdk/platforms/android-25/android.jar
applyFileOverlay for drawable
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for font
applyFileOverlay for mipmap
Processing image: res/drawable-mdpi/app_icon.png
Processing image: res/drawable-xhdpi/app_banner.png
(processed image res/drawable-mdpi/app_icon.png: 90% size of source)
(processed image res/drawable-xhdpi/app_banner.png: 88% size of source)
(new resource id app_banner from xhdpi-v4/drawable/app_banner.png #generated)
(new resource id app_icon from mdpi-v4/drawable/app_icon.png #generated)
(new resource id app_icon from res/drawable-anydpi-v26/app_icon.xml)
(new resource id app_icon_round from res/drawable-anydpi-v26/app_icon_round.xml)
Processing image: res/mipmap-mdpi/app_icon.png
(processed image res/mipmap-mdpi/app_icon.png: 36% size of source)
(new resource id app_icon from mdpi-v4/mipmap/app_icon.png #generated)
]
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.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.CompileResources (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Comment
Your answer
Follow this Question
Related Questions
Android build error 1 Answer
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors 0 Answers
Can't Build with IL2CPP for Android after 2018.3.0 Update(Empty Project) 1 Answer
Unity says that I'm missing my NDK and SDK libraries, but I have them installed via Unity hub? 1 Answer
Failed Running UnityLinker.exe and UnityLinker.exe did not run properly! 0 Answers