Knaus Irina
Knaus Irina

Reputation: 799

Android Plugin for Unity3d ( resources not found)

I make android plugin for Unity3d and stuck with problem : resources of the Library cannot be accessed from Unity.

I read Library plugin :: Library resources not found

If I copy xml-resource file to Plugin/Android/res/ - then resource founded!! But If I copy layout-resource file to Plugin/Android/res/ - then unity3d while build for android raise exception:

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details. /Android-SDK/sdk/build-tools/22.0.0/aapt package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "/Android-SDK/sdk/platforms/android-22/android.jar" -F bin/resources.ap_ --extra-packages com.prime31.IAB:com.facebook.android:com.google.android.gms -S "/Projects/bottle_client_unity/Bottle_Unity/Temp/StagingArea/android-libraries/facebook/res" -S "/Projects/bottle_client_unity/Bottle_Unity/Temp/StagingArea/android-libraries/google-play-services_lib/res"

stderr[ res/drawable/com_facebook_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited res/drawable-ldpi/com_facebook_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited res/drawable-hdpi/com_facebook_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited res/drawable-xhdpi/com_facebook_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

Upvotes: 0

Views: 1397

Answers (2)

airvine
airvine

Reputation: 731

This is a bit old, but... I am going to answer anyways in case others run into this issue..

Make for sure to import a .aar file to the Plugin/Android/ folder instead of a .jar file. The .aar file will include all of your required resources and layout files.

Once you build a project in android studio a .aar file will be created in the output folder within the source folder of your android studio project.

Upvotes: 0

Ayyappa
Ayyappa

Reputation: 1984

Make sure you dont have multiple libraries added.

Its good if you can post complete log. But mainly duplicate jar files is the issue.

Upvotes: 0

Related Questions