Service Intent must be explicit错误
本来这个错误是5.0以上的时候
对Service必须显性声明
解决起来不难
但是我是在用友盟分享的时候遇到这个问题的
经过反复的检查
发现是5.0而且是没安装微博的时候会报错
if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP) {
try {
mController.setShareMedia(sinaContent);
mController.postShare(ctx, SHARE_MEDIA.SINA,
mShareListener);
} catch (Exception e) {
showToast(ctx, "请先安装微博或选择其他渠道");
}
} else {
mController.setShareMedia(sinaContent);
mController.postShare(ctx, SHARE_MEDIA.SINA,
mShareListener);
}