I get some error messages in Logcat when running my Android App, which was built using PhoneGap.
E/AndroidProtocolHandler(1475): Unable to open asset URL: file:///android_asset/www/css/mobile2.css
E/AndroidProtocolHandler(1475): Unable to open asset URL: file:///android_asset/www/scripts/custom.js
E/AndroidProtocolHandler(1475): Unable to open asset URL: file:///android_asset/www/scripts/customShare.js
Any ideas on how to fix this?
Check the path (where you are trying to access it) to insure that it is correct. You could also check the permissions on the file to insure that you can read/ write to the file. Hope this helps.
If this error persist after adding permission then check case of file names
as
file names are Case Sensitive in phonegap app
In my case the problem was a underscore as a first letter in a folder name. I had:
file:///android_asset/html/_js
which I renamed to:
file:///android_asset/html/js
That fixed the problem.
I have faced this issue and i have solved first i have placed my new.js file in asset-->www-->js-->new.js
after that i cut that file and placed in asset-->www-->new.js Now its working fine hope its help for you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With