I’m having some trouble integrating the new cordova plugin. Here’s what I did:
- I extracted the zip file and copied the folder
Libs/Zoom
from the zip file tolib/cordova.plugin.zoom
into the root of my ionic project. - In
package.json
I replaced"cordova.plugin.zoom": "^4.6.2166-6.603",
with"cordova.plugin.zoom": "file:./lib/cordova.plugin.zoom",
, so it uses the local version of the library. npm install
ionic cap sync
Now in Android Studio I’m getting an error on gradle sync:
No variants found for ':capacitor-cordova-android-plugins'. Check build files to ensure at least one variant exists.
There have never been any build variants in capacitor-cordova-android-plugins/build.gradle defined. Even when I add the same as in the app/build.gradle, the error persists.
In XCode it gives me the error
.../ios/capacitor-cordova-ios-plugins/sources/Cordova.plugin.zoom/Zoom.h:9:9: 'MobileRTC/MobileRTC.h' file not found
I cleaned everything pretty thoroughly after updating (git clean, Clean build folder, etc…)
Any hints, suggestions?
EDIT:
In the plugin in file src/android/build-extras.gradle
I had to remove the line:
apply plugin: 'com.android.application'
AFAIK, the Android plugin is applied in the App’s project and shouldn’t be applied twice.
Next issue seems to be with a setting in the AndroidManifest in the mobilertc library:
Manifest merger failed : Attribute application@allowBackup value=(true) from AndroidManifest.xml:6:9-35
is also present at [:mobilertc:] AndroidManifest.xml:82:9-36 value=(false).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:5:5-43:19 to override.
I had to set the allowBackup property of our application also to false to make it work. I think the mobilertc library shouldn’t set the field at all.
EDIT 2:
I finally also got iOS running. In the plugin’s plugin.xml
is this line:
<!-- <framework custom="true" embed="true" src="libs/ios/MobileRTC.xcframework" /> -->
which is not commented out in the older version of the plugin. I uncommented the line and now the project builds and I can join Zoom meetings again.
If this info helps anyone, please give a .