首页 新闻 会员 周边 捐助

sheresdk 新浪分享出错

0
悬赏园豆:10 [待解决问题]

ShareSDK.initSDK(context);
ShareParams sp = new ShareParams();
sp.setTitle("新浪分享");
sp.setText( "新浪分享测试文本");
sp.setTitleUrl("http://www.paotui.com");
sp.setSite("发布分享的网站名称");
sp.setSiteUrl("发布分享网站的地址");
Platform sinaWeibo = ShareSDK.getPlatform(context, SinaWeibo.NAME);
sinaWeibo.setPlatformActionListener(new PlatformActionListener() {

@Override
public void onError(Platform arg0, int arg1, Throwable arg2) {
// TODO Auto-generated method stub
Log.i("onError", "Platform:"+arg0+":arg1:"+arg1+":Throwable:"+arg2);
}

@Override
public void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {
// TODO Auto-generated method stub
Log.i("onComplete", "Platform:"+arg0+":arg1:"+arg1+":HashMap:"+arg2);
}

@Override
public void onCancel(Platform arg0, int arg1) {
// TODO Auto-generated method stub
Log.i("onCancel", "Platform:"+arg0+":arg1:"+arg1);
}
});
sinaWeibo.share(sp);

 

报下列错误

07-28 09:45:38.096: E/AndroidRuntime(1027): FATAL EXCEPTION: main
07-28 09:45:38.096: E/AndroidRuntime(1027): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kuangcheng.errands/cn.sharesdk.framework.ShareSDKUIShell}: android.content.res.Resources$NotFoundException: String resource ID #0x0
07-28 09:45:38.096: E/AndroidRuntime(1027): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
07-28 09:45:38.096: E/AndroidRuntime(1027): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
07-28 09:45:38.096: E/AndroidRuntime(1027): at android.app.ActivityThread.access$600(ActivityThread.java:130)
07-28 09:45:38.096: E/AndroidRuntime(1027): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
07-28 09:45:38.096: E/AndroidRuntime(1027): at android.os.Handler.dispatchMessage(Handler.java:99)
07-28 09:45:38.096: E/AndroidRuntime(1027): at android.os.Looper.loop(Looper.java:137)
07-28 09:45:38.096: E/AndroidRuntime(1027): at android.app.ActivityThread.main(ActivityThread.java:4745)
07-28 09:45:38.096: E/AndroidRuntime(1027): at java.lang.reflect.Method.invokeNative(Native Method)
07-28 09:45:38.096: E/AndroidRuntime(1027): at java.lang.reflect.Method.invoke(Method.java:511)
07-28 09:45:38.096: E/AndroidRuntime(1027): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-28 09:45:38.096: E/AndroidRuntime(1027): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-28 09:45:38.096: E/AndroidRuntime(1027): at dalvik.system.NativeStart.main(Native Method)
07-28 09:45:38.096: E/AndroidRuntime(1027): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
07-28 09:45:38.096: E/AndroidRuntime(1027): at android.content.res.Resources.getText(Resources.java:229)
07-28 09:45:38.096: E/AndroidRuntime(1027): at android.widget.TextView.setText(TextView.java:3620)

@林@的主页 @林@ | 初学一级 | 园豆:189
提问于:2014-07-28 18:02
< >
分享
所有回答(1)
0

res下的资源缺失,请仔细核对或者重新集成下。

weldonh | 园豆:202 (菜鸟二级) | 2015-01-28 14:27
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册