katzer / cordova-plugin-email-composer

Edit and send email messages
Apache License 2.0
345 stars 336 forks source link

Failed to build in ionic project #367

Closed Epameinondas-Theodoropoulos closed 2 years ago

Epameinondas-Theodoropoulos commented 2 years ago

\android\capacitor-cordova-android-plugins\src\main\java\de\appplant\cordova\emailcomposer\Provider.java:22: error: package android.support.v4.content does not exist import android.support.v4.content.FileProvider; ^

JordanDoerksen commented 2 years ago

Follow the instructions here: https://capacitorjs.com/docs/android/troubleshooting#error-package-androidsupport-does-not-exist

All you have to do is run these three lines in cmd:

npm install jetifier
npx jetify
npx cap sync android
jfoclpf commented 2 years ago

@Epameinondas-Theodoropoulos does this problem still applies? May I close this issue?

shaggygoat commented 2 years ago

I have the same issue when builidng with command:

ionic cordova build android -c=testing --release

I am trying to use github actions. I've added the 3 commands(npm install jetifier, npx jetify, npx cap sync android) but it appears that my android folder is created in platforms/android:

image

and my github action fails here:

image

Any thoughts on this approach? Thanks :)

shaggygoat commented 2 years ago

Nevermind, I got it going in Github Actions by removing the npx cap sync android step:

image

Hope this can be of use for anyone else coming across similar issues.

jfoclpf commented 2 years ago

Thank you for the feedback

This is related with Android X and I hope PR #364 will solve this issue