breautek commented on issue #1791:
URL:
https://github.com/apache/cordova-android/issues/1791#issuecomment-2744318081
k, all that looks fine to me. You do have some old deprecated stuf like
`AndroidXEnabled` (which is now forcefully enabled, cordova no longer supports
non-androidx stuff) but nothing that would cause your main complaint.
>
cordova 12.0.0 ([email protected])
gradle 8.7
node v16.16.0
build tools 34
platform android 34
So I had a re-look at your environment and I noticed that the cordova
platform version is missing. You can find which platform is installed and their
versions using `cordova platform ls`, which should look something like:
```
$ cordova platform ls
Installed platforms:
android 13.0.0
Available platforms:
browser
electron
```
If you're not already using cordova-android@13, then it would be time to
upgrade by doing:
```
cordova platform remove android
cordova platform add android@13
```
Or whatever what the vue CLI equivalent commands are.
> Application Error
> net:ERR_FILE_NOT_FOUND (file:///android_asset/www/index.html)
It is strange because this is now indicating that the app is trying to load
over `file://` which it should only do if `AndroidInsecureFileModeEnabled`
preference was enabled.
```xml
<preference name="hostname" value="localhost" />
```
This usually accompanied with the `scheme` preference, which must be
platform-specific (android only allows http or https, whereas iOS allows
anything that isn't already "claimed", so it doesn't allow http or https). So
something that is worth trying is to move that preference to the `<platform
name="android">` block, with the scheme hostname:
```xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.app.name" version="1.1.4"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
...
<platform name="android">
<preference name="scheme" value="https" />
<preference name="hostname" value="localhost" />
</platform>
</widget>
```
I'm not really confident that will actually solve anything, because the
android platform **should** by default use schemes. with `https://localhost`
being the default scheme. But if you were going to define something, that
posted example above will be more proper.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]