You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "breautek (via GitHub)" <gi...@apache.org> on 2023/09/28 13:04:10 UTC

[GitHub] [cordova] breautek edited a comment on the discussion: Cordova Plugin File doesn't work on Android 13

GitHub user breautek edited a comment on the discussion: Cordova Plugin File doesn't work on Android 13

Glad it worked...

For future readers:
<details>
<summary>~striked out bad advice~</summary>
```xml
<framework src="androidx.documentfile:documentfile:1.0.1" />
```

should have been:

```xml
<framework src="androidx.documentfile:documentfile" version="1.0.1" />
```
</details>

~I think (going off memory but the `src` attribute isn't suppose to include the version information). This approach would be a better way to go because the native project will be constructed properly when the platform is added.~

Update: `<framework src="androidx.documentfile:documentfile:1.0.1" />` is indeed the correct way to use bring in a gradle/android dependency.

If the contents of `platforms/android` is modified manually, them the changes will potentially be lost when adding or removing plugins, or when you upgrade the android platform (which involves removing it). If modifying platforms/android is required, then at least use a [hook](https://cordova.apache.org/docs/en/11.x/guide/appdev/hooks/index.html) to programmatically manipulate the native project so that the project generation is reproducible in a consistent manner.

The fix in the plugin.xml to include the `framework` directive would be ideal fix in this case however.

GitHub link: https://github.com/apache/cordova/discussions/424#discussioncomment-6491159

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org