简体   繁体   中英

FacebookSDK incompatible with Android SDK 2.1

I am working on to integrate the latest version of FacebookSDK(3.21.1) with my application.However,since facebookSDK can only support for Android SDK 2.3+, the application went wrong on device android-2.1。The error log is below:

 01-05 09:50:23.999: W/dalvikvm(770): threadid=53: thread exiting with uncaught exception (group=0x4001b188) 01-05 09:50:24.019: E/java.lang.Thread(770): [ThreadID=0040] java.lang.NullPointerException 01-05 09:50:24.019: E/java.lang.Thread(770): at android.webkit.SslErrorHandler.handleMessage(SslErrorHandler.java:62) 01-05 09:50:24.019: E/java.lang.Thread(770): at android.os.Handler.dispatchMessage(Handler.java:99) 01-05 09:50:24.019: E/java.lang.Thread(770): at android.os.Looper.loop(Looper.java:123) 01-05 09:50:24.019: E/java.lang.Thread(770): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:611) 01-05 09:50:24.019: E/java.lang.Thread(770): at java.lang.Thread.run(Thread.java:1096) 01-05 09:50:24.019: E/java.lang.Thread(770): java.lang.Throwable 01-05 09:50:24.019: E/java.lang.Thread(770): at com.boyaa.common.Log.e(Log.java:67) 01-05 09:50:24.019: E/java.lang.Thread(770): at com.boyaa.common.Debug$DefaultExceptionHandler.uncaughtException(Debug.java:24) 01-05 09:50:24.019: E/java.lang.Thread(770): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:887) 01-05 09:50:24.019: E/java.lang.Thread(770): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:884) 

I realized that some class maybe missing in Android SDK 2.1,so I tried to add SSLError.java & WebViewClient.java from Android 2.2 source code Library into FacebookSDK,but it didn't work out.

Also I cannot change the Config in AndroidManifest.xml of my own application because we have some end-users using Android 2.1 device.

Question

Is there anyway to make facebookSDK compatible to Android 2.1?No need to full-support but at least not to crash~Thanks in Advance!

No you can't. If the library need a certain version of Android, you do too. 2.1 is a really old version though...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM