简体   繁体   中英

Cordova hybrid app (missing files from my project)

Im working on a hybrid app on cordova 6, I added android, Ios and browser, currently working on android only. My project is in c:/myApp/www and the same content of it is in c:/myApp/platforms/android/assets/www , when I run cordova on browser everything is there and I can see the project from Chrome DevTools => source ; but when I run it in android, deploy it to my phone (samsung s5), debug with cable, I look into Chrome Devtools => source , I see only index.html and assets folder, while there has to be a login.html and images folder and other JS files. I even moved the images folder to assets folder but the assets folder is there and images folder is not in it!!!

All your html and images should be in your main www folder or subfolders of it.

Make sure your images folder exists here: c:/myApp/www/images

If that's not working, you could try removing and re-adding the platform using the CLI:

cordova platform remove android
cordova platform add android

You shouldn't edit your c:/myApp/platforms/android/assets/www folder directly, and you should just let the CLI automatically copy files there when you run cordova run android .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM