Tag Archives: Unity and android studio docking SDK problem

After unity connects with androidstudio, unity packages APK with an error: commandinvocationfailure: failed to re package resources

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”

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’.

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.

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.

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