Sign in to follow this  
sistemlogikadigital

Error when try to run using phonegap android

Recommended Posts

6 hours ago, PLAYERKILLERS said:

I haven't used phonegap, but either there is an error in your game.js or the script tag for game.js has not been loaded. Make sure that game.js is imported and valid before you call game.onLoad().

actually this is happened only on phonegap, on browser run fine. So i thinks there's no wrong in game.js

Share this post


Link to post
Share on other sites
3 minutes ago, PLAYERKILLERS said:

Does it provide a console where you can see other errors? It could be that the game.js file is not loaded.

it does not provide console on phonegap andorid, so i need to user alert window to catch error.

Yeah probably game.onload(); called first before game.js loaded, but i dont know why

Share this post


Link to post
Share on other sites

Usually browsers load files sequentially, so the file should be imported before you call game.onload(). It might be that you need to declare resources elsewhere. If you feel like taking the extreme approach (somewhat sloppy) you might try just pasting everything into one huge inline script tag. My advice would be to review the phonegap manual first. I believe there is also an opensource alternative to phonegap now. You might have better results with that.

Share this post


Link to post
Share on other sites
On 2/15/2019 at 1:35 PM, PLAYERKILLERS said:

Usually browsers load files sequentially, so the file should be imported before you call game.onload(). It might be that you need to declare resources elsewhere. If you feel like taking the extreme approach (somewhat sloppy) you might try just pasting everything into one huge inline script tag. My advice would be to review the phonegap manual first. I believe there is also an opensource alternative to phonegap now. You might have better results with that.

i finally solved it by move all the code to index.html

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.