Facebook SDK upgrade 4.17.0

  1. No resource found that matches the given name '@style/Theme.AppCompat.NoActionBar'
    No resource found that matches the given name '@style/Theme.AppCompat.Dialog'
    

    看提示,缺少 AppCompate,就是 android-support-v7-appcompat.jar

    project.properties 中添加引用。如:

    android.library.reference.1=../../../../../../../../Documents/SDK/android/android-sdk-macosx/extras/android/support/v7/appcompat
    

    用相对路径,比较烦。

  2. values-v11,values-v21,values-v17等等下的No resource found

    ... values-v21/styles_base.xml:71: error: Error retrieving parent for item: No resource found that matches the given name     'android:Widget.Material.ActionButton'.
    ... values-v21/styles_base.xml:80: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
    ... values-v23/styles_base.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.RatingBar.Small'.
    

    检查 android-sdk-macosx/extras/android/support/v7/appcompat/project.properties 中的 target

    调到最新。如:

    target=android-25
    
  3. No resource identifier found for attribute 'cardBackgroundColor' in package 'com.facebook'

```
/Users/xx/workspace/sdkbox/sdkbox-core/sample/facebook/proj.android/libs/facebook_lib/res/layout/  com_facebook_device_auth_dialog_fragment.xml:22: error: No resource identifier found for attribute 'cardBackgroundColor' in package   'com.facebook'
/Users/xx/workspace/sdkbox/sdkbox-core/sample/facebook/proj.android/libs/facebook_lib/res/layout/   com_facebook_device_auth_dialog_fragment.xml:22: error: No resource identifier found for attribute 'cardElevation' in package  'com.facebook'
```

缺少 `cardview` 包。`project.properties` 中添加引用。如:

```
android.library.reference.2=../../../../../../../../Documents/SDK/android/android-sdk-macosx/extras/android/support/v7/cardview
```

iOS sdk 有问题,模拟器不能登录:

工程设置里面打开 KeyChain Sharing

http://stackoverflow.com/questions/39786577/facebook-sdk-login-doesnt-work-on-simulator-on-ios-10-xcode-8

Android sdk dialog 图片时,没有 postId 返回,尽量使用 share 吧。

参考链接:

  • http://jingyan.baidu.com/article/bea41d439bd6d5b4c41be659.html
  • http://stackoverflow.com/questions/36387418/convert-facebook-android-sdk-aar-file-to-java-library-project

你可能感兴趣的:(Facebook SDK upgrade 4.17.0)