after accessing wechat and logging in SDK today, Unity packaging Apk directly reported an error, saying “command call failed: unable to repackage resources”, as shown in the figure below:
click OK and the error is displayed as follows:
CommandInvokationFailure: Failed to re-package resources.
C:\Users\ AppData\Local\Android\Sdk\build-tools\28.0.3\ aap.exe package –auto-add-overlay -v-f-m-j “gen” -m “androidmanifest.xml” -s “res” -i “C:\Users\ AppData\Local\Android\Sdk\platforms\ Android-27 \ Android. jar” -f bin/resources.ap_ –extra-packages com. Yichao. Zdqx-s “E: \ Work_Project \ MainProject \ AndroidClient_2019524 \ Temp \ StagingArea \ android – libraries \ app – debug \ res” p>
stderr[
E:\Work_Project\MainProject\AndroidClient_2019524\Temp\StagingArea\android-libraries\app-debug\res\values\values.xml:10: error: Error retrieving parent for item: No resource found that matches the given name ‘Theme. AppCompat. Light. DarkActionBar’. p>
E:\Work_Project\MainProject\AndroidClient_2019524\Temp\StagingArea\android-libraries\app-debug\res\values\values.xml:14: error: Error: No resource found that matches the given name: Attr colorAccent. p>
E:\Work_Project\MainProject\AndroidClient_2019524\Temp\StagingArea\android-libraries\app-debug\res\values\values.xml:12: error: Error: No resource found that matches the given name: Attr colorPrimary. p>
E:\Work_Project\MainProject\AndroidClient_2019524\Temp\StagingArea\android-libraries\app-debug\res\values\values.xml:13: error: Error: No resource found that matches the given name:
]
if you look carefully, you will find that it points to the typed text on the android side. There are some resources in the aar package values.xml. I here is 4 (‘ Theme. AppCompat. Light. DarkActionBar ‘and’ attr ‘colorAccent’, ‘attr’ colorPrimary ‘and’ attr ‘colorPrimaryDark’) :
comment out these complains when will Clear again after the project, an error in the AndroidManifest. XML, because it USES a comment out the above variables, but we can’t have, because in Unity again we will modify this file:
the final modified like this:
hey, carelessly said much, actually in the above comment out those variables problem has been solved, anyway I is such!
added: it has a set in the XML file should be changed to android: screenOrientation = “landscape”, this is to set the screen to landscape, the previous set up some models will be vertical screen for a moment in the game to start the p>
Read More:
- Unity package APK exception failed to re package resources
- Solution: unity package failed. Commandinvocationfailure: gradle build failed
- Unity – error reporting encountered in APK package
- Notes on unity project_ Unity webplayer failed to update unity web player
- [Unity] Solve the problem of IOException: Failed to Copy… in Unity packaging apk
- Commandinvocationfailure: failed to build APK problem record
- Unity Android failed to extract resources needed byil2cpp
- Unity package encountered an error report about gradle build failed
- Unity-failed to update unity web player
- Unity3d open prompt failed to initialize unity graphic
- The solution of “failed to load il2cpp” in Android package launched by unity
- How to Solve Unity Package Android Project Error
- Unity install ilruntime plug-in [novice installation tutorial] (supported by unity2018 and later versions)
- Failed to get the resources path in the jar package, reporting an error null pointer
- Android studio reports an error when building AAR for unity
- 【Unity 3D】Because you are not a member of this project this build will not access Unity services.
- [unity] Android package error java.lang.ClassNotFoundException Did not find class com.unity3d . player.MainActivity
- fail to start Unity Package Manager
- Create game scene in unity_ Creating a beat em up game in unity
- [unity] when using unity hub, there is a problem of “failed to delete old unit installation file…” problem