- Home /
Question by
ykanzi · May 06, 2016 at 03:45 PM ·
androidandroid buildandroidpluginandroid sdkandroid-manifest
CommandInvokationFailure: Failed to re-package resources.
I create an android plugin in unity but when i start the project in my device i find this error: Error building Player: CommandInvokationFailure: Failed to re-package resources.
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details. C:\Users\xxxxx\AppData\Local\Android\android-sdk\build-tools\23.0.2\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/xxxxx/AppData/Local/Android/android-sdk\platforms\android-23\android.jar" -F bin/resources.ap_ --extra-packages com.wall.kwallads:com.unity3d.ads.android
-S "C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res"
-S "C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res"
stderr[ C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
] stdout[ Configurations: (default)
Files: drawable\unityads_background_button_pause.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_background_button_pause.xml drawable\unityads_icon_play.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_play.xml drawable\unityads_icon_speaker_base.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_base.xml drawable\unityads_icon_speaker_triangle.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_triangle.xml drawable\unityads_icon_speaker_waves.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_waves.xml layout\unityads_button_audio_toggle.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml layout\unityads_button_pause.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_pause.xml layout\unityads_view_video_paused.xml Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_paused.xml layout\unityads_view_video_play.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml values\strings.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\values\strings.xml AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs: Type drawable
drawable\unityads_background_button_pause.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_background_button_pause.xml
drawable\unityads_icon_play.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_play.xml
drawable\unityads_icon_speaker_base.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_base.xml
drawable\unityads_icon_speaker_triangle.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_triangle.xml
drawable\unityads_icon_speaker_waves.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_waves.xml Type layout
layout\unityads_button_audio_toggle.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml
layout\unityads_button_pause.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_pause.xml
layout\unityads_view_video_paused.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_paused.xml
layout\unityads_view_video_play.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml Type values
values\strings.xml
Src: () C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\values\strings.xml Including resources from package: C:\Users\xxxxx\AppData\Local\Android\android-sdk\platforms\android-23\android.jar applyFileOverlay for drawable trying overlaySet Key=ic_launcher.png trying overlaySet Key=app_banner.png trying overlaySet Key=app_icon.png applyFileOverlay for layout trying overlaySet Key=activity_start.xml applyFileOverlay for anim applyFileOverlay for animator applyFileOverlay for interpolator applyFileOverlay for transition applyFileOverlay for xml applyFileOverlay for raw applyFileOverlay for color applyFileOverlay for menu trying overlaySet Key=start.xml applyFileOverlay for mipmap Processing image: res\drawable\app_icon.png Processing image: res\drawable-xhdpi\app_banner.png Processing image: C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallaProcedsssing\re sim\dragae: wablC:e-\Users\mxdxxxpi\ix\Docc_umentsl\palugnncher.p\Tngem p\StagingArea\android-libraries\kwallads\res\drawable-hdpi\ic_launcher.png
(processed image res\drawable\app_icon.png: 94% size of source) Processing image: C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res\drawable-xhdpi\ic_launcher.png
(processed image C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res\drawable-mdpi\ic_launcher.png: 96% size of source)
(processed image res\drawable-xhdpi\app_banner.png: 93% size of source)
(processed image C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res\drawable-hdpi\ic_launcher.png: 97% size of source)
(processed image C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res\drawable-xhdpi\ic_launcher.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 ic_launcher from mdpi-v4\drawable\ic_launcher.png
#generated)
(new resource id ic_launcher from hdpi-v4\drawable\ic_launcher.png
#generated)
(new resource id ic_launcher from xhdpi-v4\drawable\ic_launcher.png
#generated)
(new resource id unityads_background_button_pause from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_background_button_pause.xml)
(new resource id unityads_icon_play from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_play.xml)
(new resource id unityads_icon_speaker_base from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_base.xml)
(new resource id unityads_icon_speaker_triangle from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_triangle.xml)
(new resource id unityads_icon_speaker_waves from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\drawable\unityads_icon_speaker_waves.xml)
(new resource id activity_start from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res\layout\activity_start.xml)
(new resource id unityads_button_audio_toggle from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_audio_toggle.xml)
(new resource id unityads_button_pause from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_button_pause.xml)
(new resource id unityads_view_video_paused from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_paused.xml)
(new resource id unityads_view_video_play from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\unityads\res\layout\unityads_view_video_play.xml)
(new resource id start from C:\Users\xxxxx\Documents\plgn\Temp\StagingArea\android-libraries\kwallads\res\menu\start.xml)
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wall.kwallads"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".StartActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Comment
Answer by slaczky · Jun 03, 2016 at 06:06 PM
I solved it by removed and reinstalled the android sdk and removed unity-plugin-library.jar from ...MyGame\Assets\Plugins\Android\GoogleMobileAdsPlugin\libs\
Updating android sdk not worked for me, thats why I removed it and downloaded the newest sdk from here: https://developer.android.com/studio/index.html