cannot open tolua.lua: No such file or directory
项目场景:
`提示:cannot open tolua.lua: No such file or directorytolua
确定有相关文件,但是在安卓手机报错没找到相关文件
问题描述
报错:cannot open tolua.lua: No such file or directorytolua
LuaException: cannot open tolua.lua: No such file or directory
no file './tolua.lua'
no file '/usr/local/share/luajit-2.1.0-beta3/tolua.lua'
no file '/usr/local/share/lua/5.1/tolua.lua'
no file '/usr/local/share/lua/5.1/tolua/init.lua'
原因分析:
提示:路径不对,查找不到:
LuaFileUtils.cs 函数FindFile无法查找到数据,LuaConst.cs 是系统路基脚本
public static class LuaConst
{public static string luaDir = Application.dataPath + "/LuaFramework/Lua"; //lua逻辑代码目录public static string toluaDir = Application.dataPath + "/LuaFramework/ToLua/Lua"; //tolua lua文件目录#if UNITY_STANDALONEpublic static string osDir = "Win";
#elif UNITY_ANDROIDpublic static string osDir = "luaframework";//查看手机 luaframework 文件路径是在 luaframework 不是 Android,
#elif UNITY_IPHONEpublic static string osDir = "iOS";
#elsepublic static string osDir = "";
#endifpublic static string luaResDir = string.Format("{0}/{1}/Lua", Application.persistentDataPath, osDir); //手机运行时lua文件下载目录 ...
}
解决方案:
修改正确路径LuaConst.cs 修改如上LuaFileUtils.cs。里面有个函数AddSearchPath在LuaState.cs 中有个函数(AddSearchPath)调用,这里也要修改正正确的路径
public void AddSearchPath(string fullPath){if (!Path.IsPathRooted(fullPath)){throw new LuaException(fullPath + " is not a full path");}RuntimePlatform plat= Application.platform;switch (plat){case RuntimePlatform.Android:fullPath = Application.persistentDataPath+ "/luaframework/lua/?.lua";break;default:fullPath = ToPackagePath(fullPath);break;}LuaFileUtils.Instance.AddSearchPath(fullPath); }
搜寻到的解决方案:
安卓上面报错LuaException: cannot open tolua.lua:
感谢!
cannot open tolua.lua: No such file or directory相关推荐
- 记录:tolua错误之LuaException: cannot open tolua.lua: No such file or directory no file ‘./tolua.lua‘解决方案
LuaException: cannot open tolua.lua: No such file or directory no file './tolua.lua' no file 'E:/uni ...
- libgstreamer-1.0.so.0: cannot open shared object file: No such file or directory
1. 问题现象 error while loading shared libraries: libgstreamer-1.0.so.0: cannot open shared object file: ...
- pip 升级之后提示 bash: /usr/bin/pip3: No such file or directory
1. 问题现象 pip 升级之后使用时报错: $ pip3 -V bash: /usr/bin/pip3: No such file or directory 通过命令查找 pip 位置 $ whic ...
- pip install faiss-gpu失败unable to execute ‘swig‘: No such file or directory
1. 安装报错 unable to execute 'swig': No such file or directory error: command 'swig' failed with exit s ...
- GCC 链接 xxx:No such file or directory 及运行可执行文件 error while loading shared libraries: xxx.so 解决方案
关于 GCC 提示找不到指定库文件的这个问题,通常出现在以下 2 个场景中: 利用静态库或者动态库文件实现链接操作(生成可执行文件)时,·GCC 可能会提示 xxx:No such file or d ...
- npm install遇到ENOENT: no such file or directory, rename错误
问题描述 npm 安装模块时遇到ENOENT: no such file or directory, rename错误 解决办法 1.删除根目录下package-lock.json文件 2.删除根目录 ...
- docker load 出错 open /var/lib/docker/tmp/docker-import-837327978/bin/json: no such file or directory
1. 问题现象 使用 docker load 加载镜像包的时候出现如下错误: open /var/lib/docker/tmp/docker-import-837327978/bin/json: no ...
- 【Qt】错误GL/gl.h: No such file or directory的解决方法(以及cannot find -lGL解决方法)
1.问题描述 QtCreator第一次编译时,报错GL/gl.h: No such file or directory 错误信息如下: /home/Qt5.6.3/5.6.3/gcc_64/inclu ...
- 【linux】可执行程序执行时报错-sh: ./mxc_v4l2_tvin.out: No such file or directory的解决方法
问题 在imx6开发板上执行 ./mxc_v4l2_tvin.out时报错: -sh: ./mxc_v4l2_tvin.out: No such file or directory 原因查找 1.路径 ...
最新文章
- java调用ffmpeg,mencoder进行视频转换,读取时长等
- Confluence 6 那些文件需要备份
- FIFOQueue '_4_batch_processing/batch_join/fifo_queue' is closed and has insu
- CK40N成本估算错误处理
- 未雨绸缪 | 一文简介 Azure Front Door
- MacOS 好用的插件和图形界面程序
- Jacobian 和Hessian矩阵
- dm8148 videoM3 link源代码解析
- 蓝桥训练之前缀和与差分
- 算法学习之路|方格分割
- 下载docker镜像包
- 华为mate30pro和华为p40pro哪个好
- Linux中的/proc文件系统详解(C/C++代码实现)
- css设置背景图片随滚动缓慢滚动_h5页面背景图很长要有滚动条滑动效果的实现...
- PC 微信 Hook 实战记录 1: 找到个人信息
- 云队友丨中国互联网反垄断简史
- 【转自D8】女神的QQ动了,我大喜,点开后默泪了,狠狠的吸了口烟。。。
- 【Day8.1】兰州牛肉拉面
- MT29F8G08ABACA nandflash 参数记录
- 计算机的应用软件在哪里,电脑软件卸载在哪里
热门文章
- linux无date命令,linux – Bash date命令无效日期
- Linux date命令精确到毫秒
- Spring Cloud 第十五天
- 12月份NBA比赛国内转播时间表(12月01日更新)
- Shader Graph 呼吸灯设置
- spring-bootsql导出date字段时区错误以及格式转换
- c语言时间消耗函数,C语言 时间函数的学习
- linux的hdmi接电视无信号怎么调,HDMI高清线连接电视机后不显示无信号的可能原因大总结...
- python wxpy登录微信,扫完二维码后,打开的软件没有关闭/ 扫二维码时不小心关闭了软件,程序会卡住不动的处理方法
- 怎么把i am a student逆置成student a am i?面试题逆置字符串讲解