你如何使用CocoonJS的HTML项目如何使用、项目、CocoonJS、HTML

2023-09-06 09:32:56 作者:胸怀无限大

我有一个HTML / JS项目,我在Eclipse中创建了我想要跨平台。我碰到CocoonJS走过来Ludei,它似乎是最好的选择(因为他们支持WebGL)我跟着在 Ludei网站上的说明

I have a HTML/JS project I created in Eclipse that I want to make cross platform. I came across CocoonJS by Ludei and it seemed like the best option (as they support WebGL) I followed the instructions on the Ludei site

我CocoonJS启动我的Andr​​oid设备上(的Nexus 7)我压缩我的HTML / JS项目,并将其推到SD卡有一个在根目录下的index.html文件的cocoonJS发射成功侦破我的拉链工程中的您的应用程序一节中

当我点击启动我的项目的一个黑色的页面,并在错误日志中:

When I click to launch my project its a black page and in the error log:

找不到任何被执行。如果您使用的是ZIP文件,请确认主HTML或JS文件是在ZIP文件(任意文件夹里面没有)的根。如果直接使用的文件夹路径,请检查主HTML或JS文件被存储在它的内部。

Could not find anything to be executed. If you are using a ZIP file, please, verify that the main HTML or JS file is in the root of the ZIP file (not inside any folder). If you are using a folder path directly, please, check that the main HTML or JS file is stored inside of it.

我已经通过其网站筛选和任何论坛,我能找到(不是很多),但have't想通了

I have sifted through their website and any forums I could find (not many) but have't figured it out

我在想什么?我有index.html,然后它不会打开。

What am I missing? I have index.html and it doesn't open up.

推荐答案

你有没有压缩的文件夹都在,还是你选择的所有文件和压缩他们?例如,如果您有:

Did you zip the folder everything was in or did you select all the files and zip them? For example if you have:

AppFolder
  |- js/
  |- img/
  |- index.html

和你要压缩含有一切像这样的一个文件夹中的AppFolder你就那么有一个zip文件:

And you were to zip the "AppFolder" you would then have a zip file which contained a folder of everything else like this:

Archive.zip
  |- AppFolder
      |- js/
      |- img/
      |- index.html

什么你需要做的是突出两个文件夹JS和IMG和HTML文件,然后点击右键进行压缩。这将产生:

What you would need to do is highlight the two folders "js" and "img" and the html file and then right click make a zip. This would produce:

Archive.zip
  |- js/
  |- img/
  |- index.html

和茧应用启动器将能够找到您的index.html。这发生在我身上,并是我的修补程序。从命令行我运行:

And the Cocoon app launcher will be able to find your index.html. This happen to me and was my fix. From the command line I run:

zip Archive.zip img/* js/* index.html

这一切都打包成一个文件Archive.zip,我再上传使用茧发射器。

And this packages everything into an Archive.zip file that I then upload using Cocoon launcher.

希望有所帮助。