mitko993 Posted April 3, 2016 Share Posted April 3, 2016 Hello, I have a simple game made with Phaser. The game runs like it should in Chrome browser and in browser mobile view but when i build it with Cordova and install it on Android device all the images are missing. The game works fine, but every single one of the images is gone (it replaces the original images with the green missing image icon). My game is organized in one www folder (inside: code, scripts, css, images folders and index.html). I create a new Cordova project (from console), install the android platform (cordova platform add [email protected]). Once the project is created i replace the Cordova project www folder with mine and run the build. I don't understand why does it run good in browser but on mobile it cant find the images. P.S. I forgot to mention, the first time i build the app with cordova it did work good. Then i just added a new state (made no changes to the existing code) and when i tried the new build this issue occured. I tried different phones, and new cordova projects but it didn't help. Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted April 3, 2016 Share Posted April 3, 2016 Try running CordovaProject/www/index.html Link to comment Share on other sites More sharing options...
mitko993 Posted April 4, 2016 Author Share Posted April 4, 2016 17 hours ago, VitaZheltyakov said: Try running CordovaProject/www/index.html If i just start index.html in my browser i get error: XMLHttpRequest cannot load because i am fetching some files with 'game.load.json' and then accessing them from cache. In the final version these files would be on the Server and downloaded when needed. But for right now i don't think they should make any problems. Do you think this is the problem why my game won't start ? If yes, then why did it work on the very first build? Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted April 4, 2016 Share Posted April 4, 2016 4 hours ago, mitko993 said: If i just start index.html in my browser i get error: XMLHttpRequest cannot load because i am fetching some files with 'game.load.json' and then accessing them from cache. In the final version these files would be on the Server and downloaded when needed. But for right now i don't think they should make any problems. Do you think this is the problem why my game won't start ? If yes, then why did it work on the very first build? You need to add cordova-plugin-inappbrowser Link to comment Share on other sites More sharing options...
mitko993 Posted April 5, 2016 Author Share Posted April 5, 2016 21 hours ago, VitaZheltyakov said: You need to add cordova-plugin-inappbrowser I do install it manually but it still it doesn't work. Could you tell me how can i check for sure that the inappbrowser plugin is installed correctly ? Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted April 5, 2016 Share Posted April 5, 2016 Try js-code: window.open(market://details?id=ru.twolamps.crystalball, '_system'); If Google Play open, then plugin work Link to comment Share on other sites More sharing options...
Recommended Posts