Unity3D Android Resource re-package failed!


 이클립스 안드로이드 프로젝트를 jar 파일로 만들고 유니티3D와 연동 후 안드로이드 타겟 빌드시 위와같이 에러가 발생했습니다. 일단 로그를 보면,

Failed to re-package resources with the following parameters:
package -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "/Volumes/MacintoshHD2/Android/android-sdk-macosx/platforms/android-17/android.jar" -F bin/resources.ap_
Configurations:
 (default)

Files:
  drawable/app_icon.png
    Src: () res/drawable/app_icon.png
  values/strings.xml
    Src: () res/values/strings.xml
  AndroidManifest.xml
    Src: () AndroidManifest.xml

Resource Dirs:
  Type drawable
    drawable/app_icon.png
      Src: () res/drawable/app_icon.png
  Type values
    values/strings.xml
      Src: () res/values/strings.xml
Including resources from package: /Volumes/MacintoshHD2/Android/android-sdk-macosx/platforms/android-17/android.jar
applyFileOverlay for drawable
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for mipmap
Processing image: res/drawable/app_icon.png
    (processed image res/drawable/app_icon.png: 94% size of source)
    (new resource id app_icon from drawable/app_icon.png #generated)
AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher').
AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'theme' with value '@style/AppTheme').

UnityEngine.Debug:LogError(Object)
PostProcessAndroidPlayer:PostProcessInternal(BuildTarget, String, String, String, String, String, String, BuildOptions)
PostProcessAndroidPlayer:PostProcess(BuildTarget, String, String, String, String, String, String, BuildOptions)
UnityEditor.HostView:OnGUI()


Error building Player: UnityException: Resource re-package failed!

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

 붉은색으로 표시한 부분이 원인인 듯 합니다.

 이클립스에서 프로젝트 만들 때 생성되어진 AndroidManifest.xml를 유니티의 플러그인 폴더에 넣은 후 android:icon="@drawable/ic_launcher" 부분을 android:icon="@drawable/app_icon" 으로 변경해줘야합니다.

 android:theme="@style/AppTheme" 부분은 삭제해줍니다.

이 블로그의 인기 게시물

Unity3D Prime31 처럼 자신만의 안드로이드 플러그인을 만들어보자

CMake Windows에 설치하기

Unity3D iOS Plugin 만들어 연동하기