havesource / cordova-plugin-push

Register and receive push notifications
MIT License
144 stars 273 forks source link

Conflict plugins cordova-plugin-idfa and phonegap-plugin-push #62

Open nevstas opened 3 years ago

nevstas commented 3 years ago

Bug Report

Conflict plugins cordova-plugin-idfa and phonegap-plugin-push I got error when add two plugins to my project (cordova-plugin-idfa and phonegap-plugin-push)

Expected Behaviour

BUILD SUCCESSFUL

Actual Behaviour

I got error: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\projects_cordova\MyApp\platforms\android\app\src\main\java\com\adobe\phonegap\push\PushPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 50 errors

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 7s

Reproduce Scenario (including but not limited to)

cordova create MyApp cordova platform add android cordova plugin add cordova-plugin-idfa

Add: \ To config.xml in section: \

Copy google-services.json to "platforms\android\app\google-services.json"

cordova plugin add phonegap-plugin-push

cordova build android

And I got error

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

c:\projects_cordova\MyApp>cordova platform Installed platforms: android 9.0.0

c:\projects_cordova\MyApp>cordova plugin cordova-plugin-idfa 1.2.0 "cordova-plugin-idfa" cordova-plugin-whitelist 1.3.4 "Whitelist" cordova-support-android-plugin 1.0.2 "cordova-support-android-plugin" cordova-support-google-services 1.3.2 "cordova-support-google-services" phonegap-plugin-multidex 1.0.0 "Multidex" phonegap-plugin-push 2.3.0 "PushPlugin"

(Android) Device Vendor (e.g. Samsung, HTC, Sony...)

cordova info Printout

Cordova Packages:

cli: 10.0.0
    common: 4.0.2
    create: 3.0.0
    lib: 10.0.0
        common: 4.0.2
        fetch: 3.0.0
        serve: 4.0.0

Project Installed Platforms:

android: 9.0.0

Project Installed Plugins:

cordova-plugin-idfa: 1.2.0
cordova-plugin-whitelist: 1.3.4
cordova-support-android-plugin: 1.0.2
cordova-support-google-services: 1.3.2
phonegap-plugin-multidex: 1.0.0
phonegap-plugin-push: 2.3.0

Environment:

OS: �������� Windows 10 ��௮�⨢��� 10.0.18363 (18363) (win32 10.0.18363) x64
Node: v12.16.3
npm: 6.14.4

android Environment:

android:

The "android" command is deprecated. For manual SDK, AVD, and project management, please use Android Studio. For command-line tools, use tools\bin\sdkmanager.bat and tools\bin\avdmanager.bat


Invoking "c:\Users\Admin\AppData\Local\Android\Sdk\tools\bin\avdmanager" "list" "target"

Available Android targets:==============] 100% Fetch remote repository...

id: 1 or "android-28" Name: Android API 28 Type: Platform API level: 28 Revision: 6

id: 2 or "android-29" Name: Android API 29 Type: Platform API level: 29 Revision: 4

Project Setting Files:

config.xml:

<?xml version='1.0' encoding='utf-8'?>

HelloCordova A sample Apache Cordova application that responds to the deviceready event. Apache Cordova Team
package.json:

--- Start of Cordova JSON Snippet --- { "plugins": { "cordova-plugin-whitelist": {}, "cordova-plugin-idfa": {}, "phonegap-plugin-push": { "ANDROID_SUPPORT_V13_VERSION": "27.+", "FCM_VERSION": "17.0.+" } }, "platforms": [ "android" ] } --- End of Cordova JSON Snippet ---

nevstas commented 3 years ago

If i use plugin "cordova plugin add github:havesource/cordova-plugin-push" I got same error

wrightsonm commented 3 years ago

I have these two plugins working on cordova 10 together with android 9 & ios 6.1.1. plugin list below has been reduced to include only the plugins that could be relevant. i may have added some of the below plugins to fix other unrelated issues.

Cordova Packages:

cli: 10.0.0
    common: 4.0.2
    create: 3.0.0
    lib: 10.0.0
        common: 4.0.2
        fetch: 3.0.0
        serve: 4.0.0

Project Installed Platforms:

android: 9.0.0

Project Installed Plugins:

cordova-android-play-services-gradle-release: 4.0.0
cordova-plugin-add-swift-support: 2.0.2
cordova-plugin-androidx-adapter: 1.1.1
cordova-plugin-idfa: 1.2.0
cordova-support-google-services: 1.4.1
havesource-cordova-plugin-push: 1.0.0

Make sure you remove phonegap-plugin-push before adding havesource-cordova-plugin-push. I currently add havesource-cordova-plugin-push direct from git rather than from npm.

nevstas commented 3 years ago

Conflict plugins cordova-plugin-idfa and github:havesource/cordova-plugin-push I got error when add two plugins to my project (cordova-plugin-idfa and github:havesource/cordova-plugin-push)

cordova create MyApp cordova platform add android cordova plugin add cordova-plugin-idfa

Add: \ To config.xml in section: \

Copy google-services.json to "platforms\android\app\google-services.json"

cordova plugin add github:havesource/cordova-plugin-push

cordova build android

And I got error: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\projects_cordova\MyApp\platforms\android\app\src\main\java\com\adobe\phonegap\push\PushPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 50 errors

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 7s

Versions:

c:\projects_cordova\MyApp>cordova platform Installed platforms: android 9.0.0

c:\projects_cordova\MyApp>cordova plugin @havesource/cordova-plugin-push 1.0.1-dev.0 "Cordova Push Plugin" cordova-plugin-idfa 1.2.0 "cordova-plugin-idfa" cordova-plugin-whitelist 1.3.4 "Whitelist" cordova-support-android-plugin 1.0.2 "cordova-support-android-plugin"