Unity exports Android project with SDK release to Facebook

I found a problem with exporting a project from Unity3D to Android Studio when using the Facebook SDK. I am currently using Unity 5.4.1f1 and facebook-unity-sdk-7.9.0 .

Here are the steps to reproduce the problem :

  • Create a Unity project and add Facebook sdk (import your own package, etc.)
  • Then configure it from the menu on the top panel in Facebook> Change Settings (just add the application id )
  • In the build settings, select the Android platform and change the player’s presets by adding the package identifier and setting min sdk version to 15
  • Save scene
  • Try to build apk, it should work
  • Now instead of building a “Google Android project” in the build setup and click export
  • After that, open android studio and click import project
  • Select a folder with the name of the project you selected, you can find it inside the folder of your choice during the export procedure from Unity
  • Click next and complete
  • When the class finishes its stuff and builds, you get an error message

: (131) : , '@style/Theme.AppCompat.NoActionBar'.

: (136) : , '@style/Theme.AppCompat.Dialog'.

: (131) : , '@style/Theme.AppCompat.NoActionBar'.

: (136) : , '@style/Theme.AppCompat.Dialog'.

: ': facebookandroidsdk4170: processDebugResources'. com.android.ide.common.process.ProcessException: aapt

- ?

+4
1

, appcompat, android , .aar ( , Unity 5.5).

.AAR /Android ( facebook) Android.

build.gradle( , ) .aar :

compile(name: 'aarlibrarywithoutextension', ext: 'aar')

, common.aar, :

compile(name: 'common', ext: 'aar')

, :

allprojects {
   repositories {
      jcenter()

      flatDir {
        dirs 'libs'
      }
   }
}

flatDir android (, .AAR libs Android)

0

Source: https://habr.com/ru/post/1662653/


All Articles