nativeObj的load的方法,在联机测试时是好的,但是一旦打包apk后就无法加载,求解答
6秒真男人
- 发布:2017-01-18 13:54
- 更新:2017-02-15 15:23
- 阅读:1490
猫猫猫猫 - 用户已离线
如果用这个地址_www/images/footImg.png,也不行的话,那就可以怀疑是新版的H5+SDK的bug了,还好安卓可以打debug模式的包,可以调试一下看此页面有没有什么报错,如果有根据报错定位一下bug,或者向官方反馈一下。
使用Base64的方式加载图片可以,其他方式都不行。
var base64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAANCAYAAAC3mX7tAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozMTEzNzIwNkQyNUMxMUU2QTc5Mzg1ODgzNkU5OTc4RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozMTEzNzIwN0QyNUMxMUU2QTc5Mzg1ODgzNkU5OTc4RCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjMxMTM3MjA0RDI1QzExRTZBNzkzODU4ODM2RTk5NzhEIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjMxMTM3MjA1RDI1QzExRTZBNzkzODU4ODM2RTk5NzhEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+toNQOQAAAGtJREFUeNq0zcsNwDAIA9DE6nQ9s0IG6RztHJ2vqcQBKf2AYpAsfIFXRaQEZ9V9Ro4QRFrP0bNrT4Hux5v2qr2xIYvYcWOYQEIYJhE3BgLiwkBCfjEQkU8MZOQVQwLyiCEJGbAlEbFYuQQYAJXaF3n4/BVEAAAAAElFTkSuQmCC";
var arrow = new plus.nativeObj.Bitmap('img/border/arrow.png');
arrow.loadBase64Data(base64);
6秒真男人 (作者)
试了一下,还是不行,在安卓机上面
2017-01-18 15:49
6秒真男人 (作者)
我改成这样的 issue.load('_www/images/footImg.png',function(){
2017-01-18 15:50
猫猫猫猫
回复 6秒真男人:打个能调试的包,看有没有什么报错
2017-01-18 16:12