Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android端 新浪微博分享本地图片报错 #82

Open
huntrist opened this issue Jan 21, 2021 · 2 comments
Open

Android端 新浪微博分享本地图片报错 #82

huntrist opened this issue Jan 21, 2021 · 2 comments

Comments

@huntrist
Copy link

    SSDKMap params = SSDKMap()
    ..setSina(
      text, //text,
      null, //title,
      <String>[
        path,
      ], //images,
      null, //video,
      null, //url,
      null, //latitude (double)
      null, //longitude (double)
      null, //objid
      null, //is story
      null, //network imageUrl
      path, //local imagePath
      SSDKContentTypes.image, //content Type
    );
    await SharesdkPlugin.share(
        ShareSDKPlatforms.sina, params, 
        (SSDKResponseState state, Map userdata,
        Map contentEntity, SSDKError error) {
          //callback
          //showAlert(state, error.rawData, context);
          if (state == SSDKResponseState.Success) {
            ok = true;
          } else {
            ok = false;
            throw error.rawData;
          }
        }
    );

会报错:

{error: errorCode: 2 errorMessage: Attempt to invoke virtual method 'java.util.Iterator java.util.ArrayList.iterator()' on a null object reference errorDetail: error from weibo client!}
I/flutter (17318): #0      WeiboShare.localImage.<anonymous closure>
package:jikidia/…/share/weibo.dart:133
I/flutter (17318): #1      SharesdkPlugin.share.<anonymous closure>
package:sharesdk_plugin/sharesdk_interface.dart:33
I/flutter (17318): #2      _rootRunUnary (dart:async/zone.dart:1198:47)
I/flutter (17318): #3      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
I/flutter (17318): #4      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
I/flutter (17318): #5      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
I/flutter (17318): #6      Future._propagateToListeners (dart:async/future_impl.dart:725:32)
I/flutter (17318): #7      Future._propagateToListeners (dart:async/future_impl.dart:621:9)
I/flutter (17318): #8      Future._completeWithValue (dart:async/future_impl.dart:529:5)
I/flutter (17318): #9      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
I/flutter (17318): #10     _completeOnAsyncReturn (dar
W/libEGL  (17318): EGLNativeWindowType 0x7229774090 disconnect failed

Flutter 1.22.5
ShareSDK 1.2.9

分享网络图片到微博没有问题。分享文字到微博没有问题。
只有Android端分享本地图片到微博报错。iOS没有问题。
图片存储地址为 flutter中的 getTemporaryDirectory()。用ShareSDK分享同一张图到QQ及QZone没有问题。

@ueed
Copy link

ueed commented Jan 27, 2021

您这个应该是本地图片路径的适配问题引起的,我们会在3.8.5版本修复

@huntrist
Copy link
Author

请问这个问题有进展了么?Flutter端何时能修复呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants