Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
110 stars 139 forks source link

Conflict with Google Play (Fit) Services #285

Closed anibalsanchez closed 6 years ago

anibalsanchez commented 6 years ago

Hi,

I've been debugging an issue previously reported in #283 and #284.

The problem is caused by the pushwoosh-phonegap-plugin in a project that has Google Play Services.

This is how I have been able to reproduce the issue:

cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add android
cordova plugin add cordova-plugin-health@^1.0.4
cordova plugin add pushwoosh-cordova-plugin@7.2.5
cordova build

... :app:transformClassesWithDesugarForDebugException in thread "main" java.lang.IllegalArgumentException at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108) at com.google.devtools.build.android.desugar.DefaultMethodClassFixer$DefaultMethodFinder.visit(DefaultMethodClassFixer.java:471)

After this error is generated, the project is broken beyond repair... some critical platform jar files (firebase jar, R.*) have been removed so it is not possible to fix it removing pushwoosh plugin. So, to fix it:

cordova plugin remove pushwoosh-cordova-plugin
cordova plugin remove cordova-plugin-health
cordova platform remove android 
cordova platform add android
cordova plugin add cordova-plugin-health@^1.0.4 

The conflict is not found in a project without cordova-plugin-health plugin... so I guess that the condition is only found when Google Play Services and pushwoosh plugin collide.

wfhm commented 6 years ago

Same as #284. Fixed with 7.3.1 release.