[LayaNative 2.0]打包native报错

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #ffffff; background-color: #1e2028}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #ffffff; background-color: #1e2028; min-height: 13.0px}
2019-06-18 13:34:08.458935+0800 test1[6479:65523] >>>>>>Thread Mode = single
2019-06-18 13:34:08.459188+0800 test1[6479:65523] 当前应用软件版本:2.0
2019-06-18 13:34:08.459307+0800 test1[6479:65523] 当前应用Local版本号码:1
2019-06-18 13:34:08.498040+0800 test1[6479:65523] iOS OpenGL ES 3.0 context created
2019-06-18 13:34:08.498646+0800 test1[6479:65523] AppVersion=2.0
2019-06-18 13:34:08.500431+0800 test1[6479:65523] Reachability Flag Status: -R ------- networkStatusForFlags
2019-06-18 13:34:08.500574+0800 test1[6479:65523] >>>>>>>checkNetworkState 有网络
2019-06-18 13:34:08.500671+0800 test1[6479:65523] =============onGLReady width=828,height=1792
2019-06-18 13:34:08.500957+0800 test1[6479:65523] download thread num = 3
2019-06-18 13:34:09.231013+0800 test1[6479:65523] createOpenALSource current num=10
2019-06-18 13:34:09.231349+0800 test1[6479:65523] Start js scripts/apploader.js
2019-06-18 13:34:09.237285+0800 test1[6479:65523] js thread started.
2019-06-18 13:34:09.244289+0800 test1[6479:65523] found the file in the package:scripts/runtimeInit.js
 
2019-06-18 13:34:09.247560+0800 test1[6479:65523] found the file in the package:scripts/apploader.js
 
2019-06-18 13:34:09.274697+0800 test1[6479:65523]  {
  "os" : "ios",
  "devicename" : "x86_64",
  "imei" : "imeixxx",
  "imsi" : "imsixxx",
  "phonemodel" : "iPhone",
  "localmodel" : "iPhone",
  "retinavalue" : "2.000000",
  "osversion" : "12.2",
  "resolution" : "414*896",
  "guid" : "63DF4A23-BD94-4B10-9B99-F5DDFE6495A1"
}
2019-06-18 13:34:09.275196+0800 test1[6479:65523] >>>>>>>>>>>>>>>>>>>ios info free: 56442880
active: 2728853504
inactive: 2695892992
wire: 2011918336
zero fill: 926752768
reactivations: 3324448768
pageins: 3167514624
pageouts: 593367040
faults: 42467735
cow_faults: 5934271
lookups: 0
hits: 0
2019-06-18 13:34:09.275970+0800 test1[6479:65523] found the file in the package:app.json
 
2019-06-18 13:34:09.276568+0800 test1[6479:65523]  require(/sdcard/layabox/scripts/index.js)
2019-06-18 13:34:09.277721+0800 test1[6479:65523] found the file in the package:scripts/index.js
 
2019-06-18 13:34:09.279091+0800 test1[6479:65523]  ======================================================
2019-06-18 13:34:09.279257+0800 test1[6479:65523]               LAYA CONCH            
2019-06-18 13:34:09.279379+0800 test1[6479:65523]       runtimeversion:ios-conch6-release-2.1.0
2019-06-18 13:34:09.279486+0800 test1[6479:65523]            jsversion:2.1.3.1
2019-06-18 13:34:09.279600+0800 test1[6479:65523]               isplug:true
2019-06-18 13:34:09.279703+0800 test1[6479:65523]  ======================================================
2019-06-18 13:34:09.279839+0800 test1[6479:65523]  require(/sdcard/layabox/scripts/promise.js)
2019-06-18 13:34:09.280571+0800 test1[6479:65523] found the file in the package:scripts/promise.js
 
2019-06-18 13:34:09.281516+0800 test1[6479:65523]  require(/sdcard/layabox/scripts/async.js)
2019-06-18 13:34:09.282040+0800 test1[6479:65523] found the file in the package:scripts/async.js
 
2019-06-18 13:34:09.284513+0800 test1[6479:65523]  loadApp:http://stand.alone.version/index.js
2019-06-18 13:34:09.285842+0800 test1[6479:65523] setCachePath:/Users/tinsoldier/Library/Developer/CoreSimulator/Devices/EB7DAF12-B550-4E95-8A8E-7515308079E6/data/Containers/Data/Application/70B6C304-E803-4AE3-9A7E-8B3148707FE1/Library/Caches//appCache/
2019-06-18 13:34:09.286753+0800 test1[6479:65523] found the file in the package:assetsid.txt
 
2019-06-18 13:34:09.287680+0800 test1[6479:65523] read index:/Users/tinsoldier/Library/Developer/CoreSimulator/Devices/EB7DAF12-B550-4E95-8A8E-7515308079E6/data/Containers/Data/Application/70B6C304-E803-4AE3-9A7E-8B3148707FE1/Library/Caches//appCache/9ea141a6/filetable.txt
2019-06-18 13:34:09.292183+0800 test1[6479:65523] OpenGL ES version [OpenGL ES 3.0 APPLE-17.0.77]
2019-06-18 13:34:09.378561+0800 test1[6479:65523]  require(/sdcard/layabox/scripts/config.js)
2019-06-18 13:34:09.379107+0800 test1[6479:65523] found the file in the package:scripts/config.js
 
2019-06-18 13:34:09.380089+0800 test1[6479:65523]  JSBridge bgColor: ["#000000"]
2019-06-18 13:34:09.380371+0800 test1[6479:65523] JSRuntime::callMethod {}
2019-06-18 13:34:09.380592+0800 test1[6479:65523]  JSBridge setFontColor: ["#ffffff"]
2019-06-18 13:34:09.380823+0800 test1[6479:65523] JSRuntime::callMethod {}
2019-06-18 13:34:09.381072+0800 test1[6479:65523]  JSBridge setTips: [["新世界的大门即将打开","敌军还有30秒抵达战场","妈妈说,心急吃不了热豆腐"]]
2019-06-18 13:34:09.381264+0800 test1[6479:65523] JSRuntime::callMethod {}
2019-06-18 13:34:09.382030+0800 test1[6479:65523]  xhr.GET url=http://stand.alone.version/index.js
2019-06-18 13:34:09.383314+0800 test1[6479:65578] Download [  ]:http://stand.alone.version/index.js
2019-06-18 13:34:09.388180+0800 test1[6479:65578] curl_easy_perform failed, code=6
src=http://stand.alone.version/index.js
2019-06-18 13:34:09.388455+0800 test1[6479:65578] Downloaded http://stand.alone.version/index.js@ s=0 l=0
2019-06-18 13:34:09.408234+0800 test1[6479:65523] >>>JCConchRender::clearAllData =437659072
2019-06-18 13:34:09.410147+0800 test1[6479:65523]  xhr.GET url=http://stand.alone.version/index.js
2019-06-18 13:34:09.411917+0800 test1[6479:65579] Download [  ]:http://stand.alone.version/index.js
2019-06-18 13:34:09.427391+0800 test1[6479:65579] curl_easy_perform failed, code=6
src=http://stand.alone.version/index.js
2019-06-18 13:34:09.427812+0800 test1[6479:65579] Downloaded http://stand.alone.version/index.js@ s=0 l=0
2019-06-18 13:34:09.431300+0800 test1[6479:65523]  xhr.GET url=http://stand.alone.version/index.js
2019-06-18 13:34:09.431984+0800 test1[6479:65578] Download [  ]:http://stand.alone.version/index.js
2019-06-18 13:34:09.438034+0800 test1[6479:65578] curl_easy_perform failed, code=6
src=http://stand.alone.version/index.js
2019-06-18 13:34:09.438321+0800 test1[6479:65578] Downloaded http://stand.alone.version/index.js@ s=0 l=0
2019-06-18 13:34:09.448590+0800 test1[6479:65523]  xhr.GET url=http://stand.alone.version/index.js
2019-06-18 13:34:09.449247+0800 test1[6479:65579] Download [  ]:http://stand.alone.version/index.js
2019-06-18 13:34:09.457461+0800 test1[6479:65579] curl_easy_perform failed, code=6
src=http://stand.alone.version/index.js
2019-06-18 13:34:09.457846+0800 test1[6479:65579] Downloaded http://stand.alone.version/index.js@ s=0 l=0
2019-06-18 13:34:09.465041+0800 test1[6479:65523]  JSBridge setFontColor: ["#FF0000"]
2019-06-18 13:34:09.465393+0800 test1[6479:65523] JSRuntime::callMethod {}
2019-06-18 13:34:09.465548+0800 test1[6479:65523]  JSBridge setTips: [["网络异常,请检查您的网络或与开发商联系。"]]
2019-06-18 13:34:09.465730+0800 test1[6479:65523] JSRuntime::callMethod {}
2019-06-18 13:34:09.466304+0800 test1[6479:65523] JsAppCache::loadCachedURL Error, no cache data.
2019-06-18 13:34:09.466633+0800 test1[6479:65523]  onLayaInitError error=Load start url error
2019-06-18 13:34:09.466822+0800 test1[6479:65523] alert=加载游戏失败,可能由于您的网络不稳定,请退出重进
 
 
一个ios 打包文件一个工程文件
已邀请:

浪货界扛把子

赞同来自: wtfff1

我的已经解决,是我构建完工程后,执行layadcc时资源目录错了(资源目录我少写了/bin);
 
解决方式:执行命令生成cache文件(example2是我的游戏根目录):
layadcc /Users/***/Documents/myLaya/example2/bin -cache -url http://stand.alone.version/index.html -cout /Users/***/Documents/myLaya/example2
 
结果:在example2中生成cache文件夹,替换到Android;
 
希望能帮到你

laya新手程序员

赞同来自:

这是不是你想要的结果

happyfire

赞同来自:

从报错看,你导出项目的时候填了一个网址:http://stand.alone.version/index.js 这个应该是不存在的,所以下载不下来报错了。你如果打的是网络下载包,就需要填写一个正确的url,里面有可以跑的H5游戏版本,如果你想打包单机版,就无所谓了,单机版我没搞过,应该不用填url,也不会从url下载

enger

赞同来自:

先打包安卓确认项目没问题,然后再试试ios

xiaocai

赞同来自:

http://stand.alone.version/index.js 这个问题我也遇到了 这个地址打的包就是会报错的 安卓也会 自己发布个项目到服务器 然后填上自己的地址就行

HumbleDust

赞同来自:

首先把代码打成release包,然后使用release源代码打native
native中xuy需要设置方向跟index页面的方向一致。
1.点击项目,选中左边TAEGETS中项目标签页,在General中设置项目的横竖屏
2.修改resource目录下config.ini文件中orientation的值与设置的横竖屏值匹配
  1. orientation=2 //竖屏:IOS home键在下
  2. orientation=4 //竖屏:IOS home键在上
  3. orientation=8 //横屏:IOS home键在左
  4. orientation=16 //横屏:IOS home键在右

orientation的值可以使用按位或的方式进行设置,例如:
  1. orientation=6 //代表竖屏可以任意旋转
  2. orientation=24 //代表横屏可以任意旋转

浪货界扛把子

赞同来自:

好巧,我今天也遇到,明天再尝试解决

浪货界扛把子

赞同来自:

我又读了一遍  缓存工具layadcc我应该是资源打错了
 

星夜

赞同来自:

最近已完成  Android && ios  &&  小游戏 && h5(支持所有平台)的所有发布工具链. 
微信:  bofly001欢迎咨询.   请带上备注. 避免被拒绝.

你这个应该是操作有问题.  
一两句话说不清楚. 

杜1

赞同来自:

楼主解决了这个问题吗?   
我这边也遇到了 ios 加载http://stand.alone.version/index.js失败.
android下是正常的.

邀月

赞同来自:

我也遇到这个问题,Android 没问题, ios 加载http://stand.alone.version/index.js失败.

要回复问题请先

商务合作
商务合作