Building Ionic app with PhoneGap result in missing build folder and files(main.css,main.js.vendor.js and polyfills.js)


#1

My app is working on desktop using ionic-serve but when I pull the code on to phonegap for generating android build it is showing only white blankscreen, on searching I found a way to inspect the error through chrome using

chrome://inspect/#devices

Its shows the blank screen aswell with 4 files missing error in console log;
main.js
main.css
vendor.js
polyfills.js

Please someone help to get this problem solved.

Thanks


#2

Building an Ionic app with Phonegap makes no sense as Phonegap is just a distribution of Cordova.

Are you maybe talking about Phonegap build?


#3

Thank you Sujan for your reply.

Actually I used to build ionic 1 apps on build.phonegap.com, since its really a fast tool to get APK in order to test it on mobile device, as you already know that using ionic cli to build android app takes too much (correct me if I am wrong). But know I have tried to build ionic 2 apps through Phonegap using the same method it is resulting in white screen and when debugged using chrome inspector I notice that build folder and its files are missing.


#4

I repeat: What you are using is Phonegap Build, not Phonegap. Phonegap is a library similar to Cordova, Phonegap Build is a service similar to Ionic Package.

Problem with Phonegap Build is that it knows nothing about Ionic 2+ and so doesn’t build you Ionic app first. So after it checks out your code the src is there, but nothing in www. It would have to ionic cordova build ios/android first.


#5

Hi, thanks for replying again.

I build an APK using ionic cli using this commad cordova build android. Now the white screen issue is fixed but the error is there; that is following files are mssing:

vendor.js (Failed to load resource: net::ERR_FILE_NOT_FOUND)


#6

This is not Ionic CLI but Cordova CLI. The Ionic CLI command would be ionic cordova build android.