安卓分享本地图片不成功,苹果的可以,求大牛帮忙看看

shareBg:function(){
console.log(’********************************’);
var math = parseInt(Math.random()*3 + 1)

   var fullPath = jsb.fileUtils.getWritablePath() +'img/';
   if (!jsb.fileUtils.isDirectoryExist(dirpath)) {
    jsb.fileUtils.createDirectory(dirpath);
}

   var rawPicPath = cc.url.raw('resources/textures/'+math+'.png');
   var picData = jsb.fileUtils.getDataFromFile(rawPicPath);
   jsb.fileUtils.writeDataToFile(picData, fullPath);
   console.log('-------------------------');
   console.log(fullPath);
   var check = jsb.fileUtils.getWritablePath() +'img/'+math+'.png' ;
   var height = 720;
   var width =1280;
    var IOS_AP = "**********************";
   var ANDROID_AP = "*************************";
   if(cc.sys.os == cc.sys.OS_ANDROID){
       jsb.reflection.callStaticMethod(ANDROID_AP, "ShareIMG", "(Ljava/lang/String;II)V",check,width,height);
   }
   else if(cc.sys.os == cc.sys.OS_IOS){
       jsb.reflection.callStaticMethod(IOS_AP, "shareIMGpyq:width:height:",check,width,height);
   }
   else{
       console.log("platform:" + cc.sys.os + " dosn't implement share.");
   }

},

1赞

图片大小为500k

安卓的分享代码:
public static void ShareIMG(String path,int width,int height){
try{
File file = new File(path);
if (!file.exists()) {
return;
}
Bitmap bmp = BitmapFactory.decodeFile(path);

		WXImageObject imgObj = new WXImageObject(bmp);
		//imgObj.setImagePath(path);
		
		WXMediaMessage msg = new WXMediaMessage();
		msg.mediaObject = imgObj;
		
		
		Bitmap thumbBmp = Bitmap.createScaledBitmap(bmp, width, height, true);
		bmp.recycle();
		msg.thumbData = Util.bmpToByteArray(thumbBmp, true);
		
		SendMessageToWX.Req req = new SendMessageToWX.Req();
		req.transaction = buildTransaction("img");
		req.message = msg;
		req.scene = SendMessageToWX.Req.WXSceneSession;
		api.sendReq(req);	
	}
	catch(Exception e){
		e.printStackTrace();
	}
}
1赞

点击 会出现卡顿一下,但是拉不起微信响应

width height超过了安卓的限制,128,72就可以分享了