Unity Exporting Android Project With Facebook Sdk Issue
I found an issue on exporting a project from Unity3D to Android Studio when Facebook SDK is involved. Currently I'm using Unity 5.4.1f1 and facebook-unity-sdk-7.9.0. Here the steps
Solution 1:
Seems like you are missing the appcompat library, the problem with exporting to android studio is that it doesn't export .aar files well (at least before Unity 5.5).
You have to copy all your .aar files in your Plugins/Android (there may be also in the facebook folder) into your android studio project libs folder.
Then open your app build.gradle (normally named app or same as your project's name) and put inside the dependencies this for each .aar file:
compile(name: 'aarlibrarywithoutextension', ext: 'aar')
for example if you have a common.aar file you should put this:
compile(name: 'common', ext: 'aar')
make sure in that file that you have this also:
allprojects {
repositories {
jcenter()
flatDir {
dirs'libs'
}
}
}
as the flatDir libs tells android studio to look for libraries there (remember that you copied all your .aar files from unity into the libs folder inside android studio project)
Post a Comment for "Unity Exporting Android Project With Facebook Sdk Issue"