facebook + android : Only fullscreen opaque activities can request orientation

点点圈 提交于 2019-11-29 01:06:42

Removing this attribute:

android:screenOrientation="portrait"

from FacebookActivity tag, may solve the problem.

When i removed this <item name="android:windowIsTranslucent">true</item> from style problem was solved.

remove this line from your style menu

  <item name="android:windowIsTranslucent">true</item>

Changed

<style name="AppTheme" parent="android:Theme.Translucent.NoTitleBar"></style>`

to

 <style name="AppTheme" parent="android:Theme.Holo.NoActionBar.TranslucentDecor"></style>

then remove

<item name="android:windowIsTranslucent">true</item>

From the latest fb integration guide, we don't need to specify either theme or orientation that is causing crash on android 8.0 . So we should use latest fb sdk with their new settings:

<activity android:name="com.facebook.FacebookActivity"
    android:configChanges=
            "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
    android:label="@string/app_name" />

https://developers.facebook.com/docs/facebook-login/android/#manifest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!