After adding FCM Plugin to project it is not building anymore.
Where cordova is checking GRADLE version? From package.json?
I've tried to change ANDROID_GRADLE_TOOLS_VERSION spec on package.json, without success.
cordova plugin add cordova-plugin-fcm-with-dependecy-updated
cordova run android
FCMPlugin: Support for Gradle v4 or lower is deprecated. Please upgrade to a newer version.FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not create task ':app:processDebugGoogleServices'.
> Cannot create a proxy class for abstract class 'GoogleServicesTask'.
BUILD FAILED in 3s
I tried to use plugin version 7.0.8 as suggested by Tiago
cordova plugin add [email protected]
Now I have conflicts with the camera plugin
> Task :app:compileDebugJavaWithJavac
C:myappappplatformsandroidappsrcmainjavaorgapachecordovacameraCameraLauncher.java:40: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
C:myappappplatformsandroidappsrcmainjavaorgapachecordovacameraCordovaUri.java:25: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
C:myappappplatformsandroidappsrcmainjavaorgapachecordovacameraFileProvider.java:21: error: package android.support.v4.content does not exist
public class FileProvider extends android.support.v4.content.FileProvider {}
^
C:myappappplatformsandroidappsrcmainjavaorgapachecordovacameraCameraLauncher.java:303: error: cannot find symbol
this.imageUri = new CordovaUri(FileProvider.getUriForFile(cordova.getActivity(),
^
symbol: method getUriForFile(Activity,String,File)
location: class FileProvider
C:myappappplatformsandroidappsrcmainjavaorgapachecordovacameraCameraLauncher.java:801: error: cannot find symbol
Uri tmpFile = FileProvider.getUriForFile(cordova.getActivity(),
^
symbol: method getUriForFile(Activity,String,File)
location: class FileProvider
5 errors
> Task :app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
Removing fcm plugin camera plugin works again.
Also its weird that even after removing fcm plugin it is still on the project and showing error messages on console
FCMPlugin.js:46 FCM: has been created
FCMPlugin.js:41 FCM: Ready error: Class not found
FCMPlugin.js:43 FCM: Ready!
FCMPlugin.js:23 FCM: Error listening to native events Class not found
question from:
https://stackoverflow.com/questions/65941591/gradle-version-conflict-after-adding-cordova-fcm-plugin 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…