I have added the Facebook SDK (v7.10.1) to my Unity project, where I have the Gamespark SDK, too.
When I build the game I get a re-package error.
Anyone a idea what's the problem?
CommandInvokationFailure: Failed to re-package resources.
D:\Programmieren\Zubehör\Android SDK\build-tools\25.0.2\aapt.exe package --
auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I
"D:/Programmieren/Zubehör/Android SDK\platforms\android-26\android.jar" -F
bin/resources.ap_ --extra-packages com.facebook:com.facebook.android -S
"E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice
Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-4.23.0\res" -
S "E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice
Slider\Temp\StagingArea\android-libraries\facebook-android-wrapper-
7.10.1\res"
stderr[
E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice
Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-
4.23.0\res\values\values.xml:131: error: Error retrieving parent for item:
No resource found that matches the given name
'@style/Theme.AppCompat.NoActionBar'.
E:\Programmieren\C#\workspaces\Ice Slider\Unity3d\Ice
Slider\Temp\StagingArea\android-libraries\facebook-android-sdk-
4.23.0\res\values\values.xml:136: error: Error retrieving parent for item:
No resource found that matches the given name
'@style/Theme.AppCompat.Dialog'.
]
stdout[
Configurations:
(default)
Files:
AndroidManifest.xml
Src: () AndroidManifest.xml
Are you using another plugins ?
Please try as follows:
Try to update lastest android sdk and build tools
If it wont work,revert back to old android sdk versions
Delete whole fb sdk and import it again
I got the solution for this problem. Here are few steps to do:
Now you can successfully build Apk for your project.
This error can be cause due to many things
this happen to me & i try deference way best solution is change sdk to -> facebook-unity-sdk-7.9.4
The appcompat package is missing from the unity project. Latest Facebook SDKs (7.10, 7.11) don't include all needed Android support libraries.
Make sure you have installed Android Studio and from within Android Studio the necessary support libraries for your project's target SDK version. Copy the needed AAR packages from
extras/android/m2repository/com/android/support
under the Android SDK folder (~/Library/Android/SDK
on mac) to thePlugins/Android/libs
folder in the Unity project. The AAR files are somewhere under the folder with the name of the package, appcompat-v7 in this case. There may be several subfolders in this folder. Find the AAR from the subfolder that matches the version you want.Many plugins and SDKs import copies of these system libraries. Which is not optimal since only one version may be present at a time. So it's left to us to manage these Android support libraries in projects that contain multiple SDKs that depend on them.