本文介绍了Android:无法找到 com.facebook.wakizashi.provider.PlatformProvider 的提供者信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在被困了好几天.我在 facebook 中使用 PhotoShareDialogBu​​ilder.我使用了类似这样的内容提供者:

I am stuck for days now. I am using the PhotoShareDialogBuilder in facebook. I used the content provider something like this :

<provider android:authorities="com.facebook.app.NativeAppCallContentProvider*****************"
                  android:name="com.facebook.NativeAppCallContentProvider"
                  android:exported="true"/>

但是,每当执行代码时,它都会给我错误.有人请帮帮我.我不想使用任何其他 api,例如简单的 facebook 等.我在 logcat 中收到的错误是:09-06 13:56:14.575: E/ActivityThread(4202): 找不到 com.facebook.wakizashi.provider.PlatformProvider 的提供者信息.

But, it gives me the error whenever the code gets executed. Someone please help me out. I don't want to use any other api like simple facebook etc.The error i receive in the logcat is :09-06 13:56:14.575: E/ActivityThread(4202): Failed to find provider info for com.facebook.wakizashi.provider.PlatformProvider.

我的代码:

 boolean canPresentShareDialogWithPhotos = FacebookDialog.canPresentShareDialog(this,
                        FacebookDialog.ShareDialogFeature.PHOTOS);


                if (canPresentShareDialogWithPhotos) {
                    FacebookDialog shareDialog = createShareDialogBuilderForPhoto(image).build();
                    uiHelper.trackPendingDialogCall(shareDialog.present());
                }

private FacebookDialog.PhotoShareDialogBuilder createShareDialogBuilderForPhoto(Bitmap... photos) {
    return new FacebookDialog.PhotoShareDialogBuilder(this)
            .addPhotos(image);
}

推荐答案

我注意到这些 logcat 错误:

I noticed that these logcat errors:

...
E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.PlatformProvider
E/ActivityThread﹕ Failed to find provider info for com.facebook.wakizashi.provider.PlatformProvider
...

仅当您的模拟器上未安装 Facebook APK 时才会出现.像这样安装 FB APP 应用程序后:

appear only if you do not have the Facebook APK installed on your emulator. After you install the FB APP app like this:

Macintosh:platform-tools admin$ ./adb install ~/Downloads/Facebook-[Version Number].apk
758 KB/s (40857788 bytes in 52.574s)
        pkg: /data/local/tmp/Facebook-32.0.0.23.15.apk
Success

这些类型的错误应该会消失.

These type of errors should disappear.

祝你好运!

这篇关于Android:无法找到 com.facebook.wakizashi.provider.PlatformProvider 的提供者信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 01:07