Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Update to target API 27 breaks Facebook integration?
Started by bscheld Jan 16 2019 03:22 PM

1 reply to this topic
android facebook native
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

bscheld

[GLOBAL: userInfoPane.html]
bscheld
  • Observer

  • 1 posts
  • Corona SDK

I have an older Android Native app that was successfully using the Facebook plugin.  So far I've been unsuccessful getting a working build (with the new project template) that includes facebook.  The Facebook SDK source on Github hasn't changed since then and is still on API 23.  Is that the cause of the issues?

 

Is there new documentation that I'm missing?  I'm still following:

https://docs.coronalabs.com/plugin/facebook-v4a/index.html

 

Has anyone successfully integrated facebook with a recent (API 27) project?  I'm currently using build 3459.

 

I've updated the android support references in the Facebook gradle project to match what's in the main project (23.4.0 -> 27.1.1)

 

I'm also getting a collision in my AndroidManifest.xml which I "fixed" by removing this (which seems bad):

<activity android:name="com.facebook.FacebookActivity"
    android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
    android:theme="@android:style/Theme.Translucent.NoTitleBar" />

However I'm still stuck with build error in com.facebook.appevents.internal.AppEventUtilty because android.support.v4.BuildConfig isn't defined.



[TOPIC: post.html]
#2

nandgate

[GLOBAL: userInfoPane.html]
nandgate
  • Enthusiast

  • 84 posts
  • Corona SDK

I'm on a roll for answering my own questions today!

 

After looking at all of the dependencies I found there was a mismatch in one of the compatibility libraries.  In the end the changes are minor:

 

 Add     

api 'com.android.support:support-v4:27.1.1' 

 to the app dependencies.

 

Update gradle.properties:

ANDROID_BUILD_MIN_SDK_VERSION=15
ANDROID_BUILD_TARGET_SDK_VERSION=27
ANDROID_BUILD_TOOLS_VERSION=27.0.3
ANDROID_BUILD_SDK_VERSION=27

There are some warnings about the facebook gradle files because they're using a deprecated syntax, but they still work (for now!)

 

Hopefully this is useful for others trying to get older apps up to date!




[topic_controls]
[/topic_controls]