Unity 5.3.4 - Failed to re-package resources.
I am using : Unity 5.3.4
Android SDK Tools 25.1.3
Android SDK Platform-Tools 23.1
Android SDK Build-Tools 23.0.3
Android 4.0.3 (API 15)
When I am building m app "Failed to re-package resources" is coming". Even After searching alot and trying some tricks error is still there.
This is the error:
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.3\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Program Files (x86)/Android/android-sdk\platforms\android-15\android.jar" -F bin/resources.ap_ --extra-packages com.google.android.gms.ads:com.google.android.gms:android.support.v4 -S "C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-ads-8.3.0\res" -S "C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res" -S "C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\support-v4-23.1.0\res"
stderr[
res\values-v21\styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.NoActionBar.Fullscreen'.
]
stdout[
Configurations:
(default)
Files:
AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs:
Including resources from package: C:\Program Files (x86)\Android\android-sdk\platforms\android-15\android.jar
applyFileOverlay for drawable
trying overlaySet Key=common_full_open_on_phone.png
trying overlaySet Key=common_ic_googleplayservices.png
trying overlaySet Key=app_banner.png
trying overlaySet Key=app_icon.png
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 mipmap
Processing image: res\drawable-xhdpi\app_banner.png
Processing image: res\drawable\app_icon.png
Processing image: res\drawable-ldpi\app_icon.png
Processing image: res\drawable-hdpi\app_icon.png
(processed image res\drawable-ldpi\app_icon.png: 98% size of source)
Processing image: res\drawable-xhdpi\app_icon.png
(processed image res\drawable\app_icon.png: 98% size of source)
Processing image: res\drawable-xxhdpi\app_icon.png
(processed image res\drawable-hdpi\app_icon.png: 97% size of source)
Processing image: res\drawable-xxxhdpi\app_icon.png
(processed image res\drawable-xhdpi\app_icon.png: 97% size of source)
Processing image: C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-mdpi\common_full_open_on_phone.png
(processed image C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-mdpi\common_full_open_on_phone.png: 103% size of source)
Processing image: C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-tvdpi\common_full_open_on_phone.png
(processed image res\drawable-xhdpi\app_banner.png: 93% size of source)
Processing image: C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-hdpi\common_full_open_on_phone.png
(processed image C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-hdpi\common_full_open_on_phone.png: 65% size of source)
Processing image: C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-xhdpi\common_full_open_on_phone.png
(processed image C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-tvdpi\common_full_open_on_phone.png: 65% size of source)
Processing image: C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-xxhdpi\common_full_open_on_phone.png
(processed image C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-xhdpi\common_full_open_on_phone.png: 65% size of source)
Processing image: C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-hdpi\common_ic_googleplayservices.png
(processed image C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-xxhdpi\common_full_open_on_phone.png: 65% size of source)
(processed image res\drawable-xxhdpi\app_icon.png: 96% size of source)
(processed image C:\Users\LENOVO PC\Documents\VR Prototype 1\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\drawable-hdpi\common_ic_googleplayservices.png: 100% size of source)
(processed image res\drawable-xxxhdpi\app_icon.png: 97% size of source)
(new resource id app_banner from xhdpi-v4\drawable\app_banner.png #generated)
(new resource id app_icon from drawable\app_icon.png #generated)
(new resource id app_icon from ldpi-v4\drawable\app_icon.png #generated)
(new resource id app_icon from hdpi-v4\drawable\app_icon.png #generated)
(new resource id app_icon from xhdpi-v4\drawable\app_icon.png #generated)
(new resource id app_icon from xxhdpi-v4\drawable\app_icon.png #generated)
(new resource id app_icon from xxxhdpi-v4\drawable\app_icon.png #generated)
(new resource id common_full_open_on_phone from mdpi-v4\drawable\common_full_open_on_phone.png #generated)
(new resource id common_full_open_on_phone from tvdpi-v4\drawable\common_full_open_on_phone.png #generated)
(new resource id common_full_open_on_phone from hdpi-v4\drawable\common_full_open_on_phone.png #generated)
(new resource id common_full_open_on_phone from xhdpi-v4\drawable\common_full_open_on_phone.png #generated)
(new resource id common_full_open_on_phone from xxhdpi-v4\drawable\common_full_open_on_phone.png #generated)
(new resource id common_ic_googleplayservices from hdpi-v4\drawable\common_ic_googleplayservices.png #generated)
]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessAndroidPlayer.Exec (System.String command, System.String args, System.String workingdir, System.String[] progress_strings, Single progress_value, System.String errorMsg)
UnityEditor.Android.PostProcessAndroidPlayer.CompileResources (System.String stagingArea, System.String packageName, UnityEditor.Android.AndroidLibraries androidLibraries)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.HostView:OnGUI()
Answer by m-h-skandary · Apr 13, 2017 at 05:18 PM
Material.Light theme requires API level 21 for project. Set Project Build Target to API 21. (credits to ρяσѕρєя K)
Worked for me too! What is $$anonymous$$aterial.Light anyway? I wasn't using any lit material in my project; any way to remove this resource from the project?
Your answer
Follow this Question
Related Questions
Unity 2017.2.0b9 ARCore build&run with Pixel XL (Android 8.0) Failed 0 Answers
CommandInvokationFailure: Failed to re-package resources. 1 Answer
How to move character forward and also face moving direction ? 1 Answer
Unity Daydream Preview - Raycast/camera alignment 1 Answer
jni error has occurred local reference table overflow (max=512) Android crashes on start. 1 Answer