andrehtissot / cordova-plugin-fcm-with-dependecy-updated

Google FCM Push Notifications Cordova Plugin
MIT License
208 stars 277 forks source link

is it compatible with android@10? #281

Open kotran88 opened 2 years ago

kotran88 commented 2 years ago
Ionic:

   Ionic CLI          : 5.4.16 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.1

Cordova:

   Cordova CLI       : 10.0.0 (cordova-lib@10.1.0)
   Cordova Platforms : android 10.1.1
   Cordova Plugins   : no whitelisted plugins (31 plugins total)

Utility:

   cordova-res : not installed
   native-run  : 1.5.0

System:

   NodeJS : v10.16.3 (/Users/pedrojung/.nvm/versions/node/v10.16.3/bin/node)
   npm    : 8.1.2
   OS     : macOS Monterey
   Xcode  : Xcode 13.3 Build version 13E113

I added config.xml

<preference name="AndroidXEnabled" value="true" />
<preference name="GradlePluginGoogleServicesEnabled" value="true" />
<preference name="GradlePluginGoogleServicesVersion" value="4.3.8" />

then I run android on my device

and cause error I already have google-services.json on root folder and platforms/android folder.


> Configure project :app
Adding classpath: com.google.gms:google-services:4.3.8
WARNING:: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 7.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
+-----------------------------------------------------------------
| cordova-android-support-gradle-release: 27.+
+-----------------------------------------------------------------
Could not find google-services.json while looking in [src/debug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> com.android.build.gradle.internal.crash.ExternalApiUsageException: org.gradle.api.internal.tasks.DefaultTaskContainer$DuplicateTaskException: Cannot add task 'processDebugGoogleServices' as a task with that name already exists.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4s
Command failed with exit code 1: /Users/pedrojung/Downloads/android_test/platforms/android/gradlew cdvBuildDebug -b /Users/pedrojung/Downloads/android_test/platforms/android/build.gradle
[ERROR] An error occurred while running subprocess cordova.

        cordova build android --device exited with exit code 1.