I am building project with Ionic 5.
Yes you can. I’m doing this myself. It is done though capacitor
https://capacitor.ionicframework.com/docs/cordova/using-cordova-plugins/
I can think of two ways to interpret this question, to which I would have two different answers:
A: can capacitor also bridge to cordova plugins? a qualified “yes” here, as @Vigors says. some cordova plugins are compatible, but not all.
B: can I build with both cordova and capacitor? I can’t think of a benefit to trying to do this.
Hi rapropos
I have an issue respect to that. I have and app with geolocation and watchposition. But it does not worked fine on my cellphone. @capacitor/geolocation failed on my phone. I read in a post from a Capacitor programmer that new Android versions have troubles with that service and capacitor.
I use @ionic-native/http/ngx @ionic-native/geolocation/ngx worked fine without install Cordova.
Nevertheless, when I use Background-Geolocation from: [https://ionicframework.com/docs/native/background-geolocation](https://Oficial Native Ionic Plugins) , when I build my code in Android Studio I received somethink like this:
FAILURE: Build failed with an exception.
-
Where:
Script ‘D:\PROJECTS\IONIC PROJECTS\taxi\node_modules@mauron85\cordova-plugin-background-geolocation\android\dependencies.gradle’ line: 3 -
What went wrong:
A problem occurred evaluating script.
Could not find method compile() for arguments [com.github.tony19:logback-android:1.1.1-9] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Your error message mentions logback-android
- I would suggest eliminating any dependencies on that library and seeing what happens.