Installing Facebook apk on Android Emulator

空扰寡人 提交于 2019-12-07 04:15:33

问题


Has anyone managed to do this?!

I've tried various combinations of sdk/apk from this site with no luck. https://developers.facebook.com/docs/android/downloads

When I use this SDK...

dependencies {
    compile 'com.facebook.android:facebook-android-sdk:3.23.0'
}

... it only seems to work with targetSdkVersion "L". So fine. I run that emulator in x86 and use adb to install

./sdk/platform-tools/adb install Facebook-25.0.0.19.30.apk

I get "INSTALL_FAILED_NO_MATCHING_ABIS". On ARM, I have not managed to get the emulator to actually start. It's been "Preparing Recommendations" for over 30 minutes now.

With a lower Facebook sdk version (com.facebook.android:facebook-android-sdk:3.21.1), I am able to run the emulator with a targetSdkVersion of 19, and install the Facebook.apk (Facebook APK 22.0)

Unfortunately, when I open the Facebook app, I get the message that

"This version of android is no longer supported. please upgrade your device and try again"

I must be doing something wrong. Could anyone point me in the right direction?


回答1:


Answer taken from here

INSTALL_FAILED_NO_MATCHING_ABIS is when you are trying to install an app that has native libraries and it doesn't have a native library for your cpu architecture. For example if you compiled an app for armv7 and are trying to install it on an emulator that uses the Intel architecture instead it will not work.

Also, you can implement a solution on the emulator as seen here.

And, for the second error I think it's pretty clear: Facebook won't let you use that app because they don't support it anymore.




回答2:


With the newer Facebook SDKs, I couldn't find the Facebook APK file bundled with the Downloads - Facebook Android SDK.

To install facebook on an emulator:

  • I installed the Google Play Intel Atom Image from the SDK Manager.

  • Created an AVD with the Google Play Intel Atom Image

  • Now you can install Facebook from the Play Store (after sign in)

Now you can use Facebook to test Native login, etc,.



来源:https://stackoverflow.com/questions/28891844/installing-facebook-apk-on-android-emulator

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