1

I have been working on building a standalone custom unitypackage comprising of combined libraries for both iOS and Android platforms. The folder structure after importing the package in a test project contains two folders inside Assets named IosLibrary and Plugins->Android. The folder IosLibrary contains all the resources and libraries required for iOS build and the content of Android folder consists of resources and libraries used for Android build.

I have tested the integration of our package with Unity 4.7 where everything worked fine; when I build the project for iOS platform, the Xcode project for iOS contains resources/headers/libraries required for iOS build. When I tried creating a test project with same package on 5.4, the Xcode project created by Unity started to include resources in Plugins/Android that results in bunch of build errors as shown below.

Has anyone come across this before ? I would appreciate if someone can point out if there is something I am missing or have done incorrectly.

CopyPNGFile /Users/mithleshkumarjha/Library/Developer/Xcode/DerivedData/Unity-iPhone-bftkjvxwavdurpcavvsvajdqxqcc/Build/Products/Debug-iphoneos/demo.app/hs___star_hollow.png Libraries/Plugins/Android/nester/res/drawable-xxhdpi-v4/hs___star_hollow.png cd /Users/mithleshkumarjha/Projects/Unity/Unity-Test8/UnityTest8 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer![alt text][1]/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/usr/bin/copypng -compress /Users/mithleshkumarjha/Projects/Unity/Unity-Test8/UnityTest8/Libraries/Plugins/Android/nester/res/drawable-xxhdpi-v4/hs___star_hollow.png /Users/mithleshkumarjha/Library/Developer/Xcode/DerivedData/Unity-iPhone-bftkjvxwavdurpcavvsvajdqxqcc/Build/Products/Debug-iphoneos/demo.app/hs___star_hollow.png

While reading /Users/mithleshkumarjha/Projects/Unity/Unity-Test8/UnityTest8/Libraries/Plugins/Android/nester/res/drawable-xxhdpi-v4/hs___star_hollow.png pngcrush caught libpng error: [00][00][0\310"\362\277\327`\351\217T\276\353\217

Command /Applications/Xcode.app/Contents/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure

1 Answer 1

1

you may check here:enter image description here and make sure that all files in Plugins/Android are set to Android here

2
  • 1
    That worked for me. Thanks! One question remained though - The assets added are inside Assets/Plugins/Android/ folder and according to docs.unity3d.com/Manual/PluginInspector.html the platform for these should be Android by default but these are set to Any Platform for me. Any ideas why? Sep 2, 2016 at 12:59
  • It also puzzled me when i was trying to build an old project(created in 5.2 and worked well in 5.3) after upgrading Unity to 5.4. Maybe it's Unity's responsibility for this bug.
    – RickShao
    Sep 7, 2016 at 8:08

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.