- Home /
Why does Unity 5.4 include the contents of Plugins/Android to iOS Project?
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 (as shown in the attachment) 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]: /storage/temp/70180-screenshot.png
Answer by DenyskoKl · Jun 22, 2016 at 05:08 AM
Check your folders like : google-play-services_lib, exportedModule, nester etc and look in Inspector (exportedModule Import Settings), end turn off checkbox "Any platform"
Thanks! That raises another question though - shouldn't they be set to Android platform by default as per the folder na$$anonymous$$g convention Assets/Plugins/Android/* as mentioned here https://docs.unity3d.com/$$anonymous$$anual/PluginInspector.html
Your answer
Follow this Question
Related Questions
Issues with iOS Build that are not visible in Editor 0 Answers
IOS append not working? 0 Answers
Xcode build fails, How to ? 1 Answer