cancel
Showing results for 
Search instead for 
Did you mean: 

Error in building app GUIUtility.cs:179 BuildPlayerWindowBuildMethods.cs:19 BuildPlayerWindowBuild

iGerbil
Level 2
I keep getting these errors when trying to build my app.... Thing already done:
- reinstalled fresh Android SDK
- tested with a fresh new project (one scene, one cube, same errors)

Building for API 21 as recommended by Oculus Best Practices Building for 25 (GO's API) gives same error. 
But if I build for API 29 no problem, apk is generated but won't install on Oculus GO

Any idea about what the problem could be?
Using Unity 2018.4.14 LTS on Mac OS X 10.13.6

Build completed with a result of 'Failed'
UnityEngine.GUIUtilityprocessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)[/ICODE]


UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:194 
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:97 
UnityEngine.GUIUtilityprocessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)​



CommandInvokationFailure: Failed to re-package resources.
/Users/fulvio/Library/Android/sdk/build-tools/29.0.2/aapt package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "/Users/fulvio/Library/Android/sdk/platforms/android-21/android.jar" -F bin/resources.ap_

stderr[
AndroidManifest.xml:5: error: No resource identifier found for attribute 'maxAspectRatio' in package 'android'

]
stdout[
Configurations:
(default)
v21
mdpi-v4

Files:
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
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: /Users/fulvio/Library/Android/sdk/platforms/android-21/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/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.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <f92457847c324e90907abe57dde6951d>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <f92457847c324e90907abe57dde6951d>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, System.String errorMsg) (at <f92457847c324e90907abe57dde6951d>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.CompileResources (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <f92457847c324e90907abe57dde6951d>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <f92457847c324e90907abe57dde6951d>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <f92457847c324e90907abe57dde6951d>:0)
UnityEngine.GUIUtilityprocessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
1 REPLY 1

klaus_kobald_9
Level 4
similar here:

 Android resource linking failed

[...]/Temp/gradleOut/launcher/build/intermediates/merged_manifests/release/AndroidManifest.xml:39: AAPT: error: attribute android:maxAspectRatio not found.

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)