ReallySmallSoftware / cordova-plugin-firebase-crashlytics

Google Firebase Crashlytics Cordova plugin
Other
33 stars 80 forks source link

DuplicatePlatformClasses warning during building the release #10

Closed Matrosskin closed 4 years ago

Matrosskin commented 6 years ago

Expected Behavior

There should not be such warning or somewhere should be a note about that this warning is not critical and app built correctly. Also it would be great to have same behavior also during building development version.

Actual Behavior

Only during building production release I see the message:

:packageRelease
:lintVitalReleaseplatforms/android/build.gradle:266: Error: json defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
    compile "org.json:json:20171018"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Explanation for issues of type "DuplicatePlatformClasses":
   There are a number of libraries that duplicate not just functionality of
   the Android platform but using the exact same class names as the ones
   provided in Android -- for example the apache http classes. This can lead
   to unexpected crashes.

   To solve this, you need to either find a newer version of the library which
   no longer has this problem, or to repackage the library (and all of its
   dependencies) using something like the jarjar tool, or finally, rewriting
   the code to use different APIs (for example, for http code, consider using
   HttpUrlConnection or a library like okhttp.)

1 errors, 0 warnings

But the app lokks like still work correctly.

Steps to Reproduce the Problem

Just build prod version

Specifications

piotr-cz commented 5 years ago

I think error descriptions says that it's safe to remove dependency org.json:json:20171018 which is defined here as it's already provided by Android OS.

ReallySmallSoftware commented 4 years ago

Thank you for this information.