I'm using phonegap to develop an application on android, when I test it on my phone I get this error Application Error Is a directory (file:///#android_asset/www/index.html)
I only get this error when I don't have internet connection on my phone.
any suggestions?
To solve No Such File Or Directory Error in Python, ensure that the file exists in your provided path. To check all the files in the directory, use the os. listdir() method.
If your Windows 10 computer says that an error occurred while creating the directory, make sure to use an admin account. Then go to Windows Security settings and disable Controlled folder access. If the issue persists, disable your antivirus and firewall and install the problematic program again.
The error "File or directory is corrupted and unreadable" is a kind of fundamental error. This occurs when corrupted files in response to malware affect your file system. However, to recover the lost data from those directories, you need to use a professional tool.
This means, in your index.html, you are using a resource that requires internet access. See your index.html and look for any CSS, javascript or Cordova file that is linked directly from the internet. If so, you must download the related file and make it local.
I had this same problem when I linked my Jquery mobile JS file directly like this:
<script type="CSS/javascript" src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.js">
what I did was, downloaded the jquery.mobile-1.3.0.js file and had it placed locally inside my www folder. That fixed my problem.
I found the answer here: http://dev.wavemaker.com/wiki/bin/wmdoc_6.5/PhoneGap?xpage=print#HTheconnectiontotheserverwasunsucessful28file3A2F2F2Fandroidasset2Fwww2Findexhtml29
6.1 The connection to the server was unsucessful (file:///android_asset/www/index.html)
WHERE: When launching the application on an Android device.
Anything you place within your index.html file that requests a remote resource will cause the above error to be thrown for android devices, and your application will then die. The Weinre debugger is a common cause of this error.
Solution: Move the loading of remote resources out of index.html and into your application where it will fail quietly.
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