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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.