Facebook SDK: Error retrieving parent for item: No resource found that matches the given name


I was trying packaging my app with the facebook sdk plugin i am working and got the following two errors:

The AAR imports at UPL file are:

<insertValue value=“repository $S(PluginDir)/…/…/ThirdParty/repository”/>

The .aar file Facebook-4.17.0.aar and the .pom file Facebook-4.17.0.pom are located at:
…\Documents\Unreal Projects\Test_4_14\Plugins\FacebookSDK\ThirdParty\repository\com\facebook\Facebook\4.17.0

The .pom file is the following:

<project xmlns:xsi="" xmlns="" xsi:schemaLocation="">

I even added

<style name="com_facebook_activity_theme" parent="@style/Theme.AppCompat.NoActionBar">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowNoTitle">true</item>
    <style name="com_facebook_auth_dialog" parent="@style/Theme.AppCompat.Dialog">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowIsFloating">true</item>

to the style.xml in Engine/Build/Android/Java/res/values but still getting the same error.

At the …\Documents\Unreal Projects\Test_4_14\Intermediate\Android\APK\JavaLibs folder both .aar files for appcompat-v7-23.2.0 and Facebook-4.17.0 are extracted.

The issue is that the resources don’t get merged from AAR files. Adding to style above didn’t help because it is the parent=… that isn’t defined, not the 2 styles. You need to copy Theme.AppCompat.*.

The resources should be copied at res folder inside Intermediate/APK/Android, not just extracted at JavaLibs/Facebook-4.17.0/res?

Do we need to merge value.xml from JavaLibs/Facebook-4.17.0/res JavaLibs/appcompat-v7-24.1.1/res, and other similar xml files, like layouts etc and add them at Intermediate/APK/Android/res folder to work properly?

How does this work on android studio.Never really used it.

In the UPL file at resource Copies additions we can add new files with the following syntax.

    <!-- Copy the generated resource file to be packaged--> 
    <copyFile src="$S(PluginDir)/../../lib/Android/res/file_paths.xml" dst="$S(BuildDir)/res/xml/file_paths.xml" />

Can we copy a plugin folder, including subfolders and/or files.

I tried with

<copyDir src="$S(PluginDir)/../../lib/Android/res" dst="$S(BuildDir)/res" />

but it’s not working.

Hi, Makis, I’m having the exact same error. Can you help me? What did you do to move forward from this error? Thanks.