cordova-plugin-flurryanalytics icon indicating copy to clipboard operation
cordova-plugin-flurryanalytics copied to clipboard

Java 1.8 support

Open manjeetpati opened this issue 3 years ago • 3 comments

the library modifies the gradle java version and it fails build fails in subsequent packages:

package.json example:

"cordova-plugin-flurryanalytics": "^1.4.6", "cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-googlemaps": "^2.7.1",

Build fails with error:

\src\main\java\plugin\google\maps\PluginMarker.java:155: error: lambda expressions are not supported in -source 1.7 cordova.getActivity().runOnUiThread(() -> { ^ (use -source 8 or higher to enable lambda expressions)

Reason: Flurry changes the gradle java version for 1.7 and all the libraries with lambda after flurry in sequence fail with this error.

manjeetpati avatar Feb 26 '21 12:02 manjeetpati

This plugin seems outdated not maintained since longtime , I had to write my own plugin for flurry

achakra21 avatar Aug 11 '21 02:08 achakra21

So I got it to compile by changing this file from VERSION_1_7 to VERSION_1_8 :https://github.com/blakgeek/cordova-plugin-flurryanalytics/blob/master/src/android/plugin.gradle#L4

ext.postBuildExtras = {
    android {
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
}

Still working on a long term fix and verifying it actually sends.

schematical avatar Aug 13 '21 16:08 schematical

@schematical is it working for iOS on ionic capacitor 3?

achakra21 avatar Aug 13 '21 17:08 achakra21