Unity_Failed to re-package resources. See the Console for details.

Unity3d build打包app时报错:Failed to re-package resources. See the Console for details.
这里写图片描述

看下面的完整报错会发现是因为没有在规定的文件下放置资源或者资源丢失的原因导致的!

总之这些个人操作原因导致的错误就很皮。。

这里写图片描述

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
D:\software\AndriodSDK\android-sdk-windows\build-tools\27.0.3\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "D:\software\AndriodSDK\android-sdk-windows\platforms\android-27\android.jar" -F bin/resources.ap_

//错误原因,
stderr[
AndroidManifest.xml:5: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher').

]
stdout[
Configurations:
 (default)
 v14
 v21
 ldpi-v4
 hdpi-v4
 xhdpi-v4
 xxhdpi-v4
 xxxhdpi-v4

Files:
  drawable\app_banner.png
    Src: (xhdpi-v4) res\drawable-xhdpi\app_banner.png
  drawable\app_icon.png
    Src: () res\drawable\app_icon.png
    Src: (ldpi-v4) res\drawable-ldpi\app_icon.png
    Src: (hdpi-v4) res\drawable-hdpi\app_icon.png
    Src: (xhdpi-v4) res\drawable-xhdpi\app_icon.png
    Src: (xxhdpi-v4) res\drawable-xxhdpi\app_icon.png
    Src: (xxxhdpi-v4) res\drawable-xxxhdpi\app_icon.png
  values\strings.xml
    Src: () res\values\strings.xml
  values\styles.xml
    Src: () res\values\styles.xml
    Src: (v14) res\values-v14\styles.xml
    Src: (v21) res\values-v21\styles.xml
  AndroidManifest.xml
    Src: () AndroidManifest.xml

Resource Dirs:
  Type drawable
    drawable\app_banner.png
      Src: (xhdpi-v4) res\drawable-xhdpi\app_banner.png
    drawable\app_icon.png
      Src: () res\drawable\app_icon.png
      Src: (ldpi-v4) res\drawable-ldpi\app_icon.png
      Src: (hdpi-v4) res\drawable-hdpi\app_icon.png
      Src: (xhdpi-v4) res\drawable-xhdpi\app_icon.png
      Src: (xxhdpi-v4) res\drawable-xxhdpi\app_icon.png
      Src: (xxxhdpi-v4) res\drawable-xxxhdpi\app_icon.png
  Type values
    values\strings.xml
      Src: () res\values\strings.xml
    values\styles.xml
      Src: () res\values\styles.xml
      Src: (v14) res\values-v14\styles.xml
      Src: (v21) res\values-v21\styles.xml
Including resources from package: D:\software\AndriodSDK\android-sdk-windows\platforms\android-27\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\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: 99% size of source)
Processing image: res\drawable-xxxhdpi\app_icon.png
    (processed image res\drawable-xhdpi\app_icon.png: 99% size of source)
    (processed image res\drawable-xhdpi\app_banner.png: 93% size of source)
    (processed image res\drawable-xxhdpi\app_icon.png: 99% size of source)
    (processed image res\drawable-xxxhdpi\app_icon.png: 99% 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)
]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值