[LayaNative 2.0]Android打包后运行报错
我的项目是1.0开发的。导入Layabox2.0中可以网页运行无误。但用Native2.0打包,打的是本地包。运行后报错了。。
index.js:282
apploader.js:5279 HTMLScriptElement set srchttp://stand.alone.version/Main.max.js
apploader.js:5917 _downloadAysn:temp.srchttp://stand.alone.version/Main.max.js
../../../../include/common/downloadCache/JCAndroidFileSource.h:238 found the file in the package:cache/stand.alone.version/42d47cbc
/home/layabox/LayaBox/conch6git/Conch/build/conch/proj.android_studio/jni/../../../../source/conch/JSWrapper/LayaWrap/JSRuntime.cpp:222 JSRuntime::callMethod {} demo.JSBridge hideSplash
apploader.js:6384 >>>>>>>>>>>>>>>>innerWidth:1080innerHeight:1920
apploader.js:5939 >>>>>>>>>>>>>>>evalhttp://stand.alone.version/Main.max.js
apploader.js:5328 getContext type=2d
/home/layabox/LayaBox/conch6git/Conch/build/conch/proj.android_studio/jni/../../../../source/conch/JSWrapper/LayaWrap/JSGlobalExportCFun.cpp:250 alert=http://stand.alone.version/Main.max.js:16077:
ReferenceError: CanvasRenderingContext2D is not defined
to=to || CanvasRenderingContext2D.prototype;
^^
ReferenceError: CanvasRenderingContext2D is not defined
at Function.Context.__init__ (http://stand.alone.version/Main.max.js:16077:12)
at Object.Laya.init (http://stand.alone.version/Main.max.js:386:11)
at new Main (http://stand.alone.version/Main.max.js:2923:8)
at http://stand.alone.version/Main.max.js:64358:2
at http://stand.alone.version/Main.max.js:64360:3
at Document._downloadOk (apploader.js:5941:20)
at apploader.js:5920:20
at FileReader.filereader.onload (apploader.js:6467:47)
======用的Android真机调试,报错。CHROME、、、
index.js:282
apploader.js:5279 HTMLScriptElement set srchttp://stand.alone.version/Main.max.js
apploader.js:5917 _downloadAysn:temp.srchttp://stand.alone.version/Main.max.js
../../../../include/common/downloadCache/JCAndroidFileSource.h:238 found the file in the package:cache/stand.alone.version/42d47cbc
/home/layabox/LayaBox/conch6git/Conch/build/conch/proj.android_studio/jni/../../../../source/conch/JSWrapper/LayaWrap/JSRuntime.cpp:222 JSRuntime::callMethod {} demo.JSBridge hideSplash
apploader.js:6384 >>>>>>>>>>>>>>>>innerWidth:1080innerHeight:1920
apploader.js:5939 >>>>>>>>>>>>>>>evalhttp://stand.alone.version/Main.max.js
apploader.js:5328 getContext type=2d
/home/layabox/LayaBox/conch6git/Conch/build/conch/proj.android_studio/jni/../../../../source/conch/JSWrapper/LayaWrap/JSGlobalExportCFun.cpp:250 alert=http://stand.alone.version/Main.max.js:16077:
ReferenceError: CanvasRenderingContext2D is not defined
to=to || CanvasRenderingContext2D.prototype;
^^
ReferenceError: CanvasRenderingContext2D is not defined
at Function.Context.__init__ (http://stand.alone.version/Main.max.js:16077:12)
at Object.Laya.init (http://stand.alone.version/Main.max.js:386:11)
at new Main (http://stand.alone.version/Main.max.js:2923:8)
at http://stand.alone.version/Main.max.js:64358:2
at http://stand.alone.version/Main.max.js:64360:3
at Document._downloadOk (apploader.js:5941:20)
at apploader.js:5920:20
at FileReader.filereader.onload (apploader.js:6467:47)
======用的Android真机调试,报错。CHROME、、、
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
137*****509
赞同来自: