Reduce the size of android facebook SDK

匿名 (未验证) 提交于 2019-12-03 03:03:02

问题:

We are using facebook sdk to login the users to our app. But the SDK is pretty large hence it is increasing our apk size. Since we use only the login feature we do not require other modules of SDK (share, messenger etc). Is there any way we can add only the required features of SDK in the project?

Is similar feature available for facebook SDK as well? Any help is appreciated. Thanks!

回答1:

I see some possible ways :

  1. There are some Facebook sdk alternatives on GitHub like: https://github.com/greenhalolabs/facebooklogin https://github.com/sromku/android-simple-facebook So try to find the best fitted library for your needs

  2. You can try to use older Facebook library, which would be lighter, but also lack of some functions.

Before you do this point read some articles like this: Facebook authentication without login button

  1. Finally, try to exclude unnecessary libs like in this example:

    dependencies {compile('com.facebook.android:facebook-android-sdk:4.3.0') { exclude module: 'support-v4' } }



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