microsoft / appcenter-sdk-cordova

App Center Preview SDK for Cordova
http://appcenter.ms
MIT License
50 stars 27 forks source link

Android CenterSharedPlugin.java:40: error: diamond operator is not supported in -source 1.6 #86

Closed Yuripetusko closed 5 years ago

Yuripetusko commented 5 years ago

Description

Looks like Cordova has Java 1.6 by default so diamond operator is not supported ,I can perhaps modify gradle to use Java 1.8 but not sure how this will affect other plugins, better would be to fix the issue in this plugin

CenterSharedPlugin.java:40: error: diamond operator is not supported in -source 1.6

final DefaultAppCenterFuture<Void> future = new DefaultAppCenterFuture<>();

Repro Steps

Please list the steps used to reproduce your issue.

  1. Install plugin using cordova plugin add
  2. do cordova run android

Details

  1. Which SDK version are you using?
    • "cordova-plugin-appsflyer-sdk": "^4.4.18",
  2. Which OS version did you experience the issue on?
    • Android latest
  3. What version of Cordova, Cordova platforms, Cocoapods, and Ruby are you using?
    • Cordova version 7.1.0
    • cordova-android 6.4.0
  4. What device version did you see this error on? Were you using a simulator or a physical device?
    • Error is in bash/terminal
  5. What third party plugins are you using?
code-push 2.0.6 "CodePushAcquisition"
com.bez4pieci.cookies 0.0.1 "Cookies"
com.checkroom.plugin.crashlytics 0.4.0 "CrashlyticsPlugin"
cordova-play-services-version-adapter 1.0.2 "Cordova/Ionic Google Play Services Versions Incompatibility Adapter"
cordova-plugin-appcenter-analytics 0.3.3 "App Center Analytics for Cordova"
cordova-plugin-appcenter-shared 0.3.3 "App Center shared code for Cordova"
cordova-plugin-apprate 1.3.0 "AppRate"
cordova-plugin-appsflyer-sdk 4.4.15 "AppsFlyer"
cordova-plugin-buildinfo 1.1.0 "BuildInfo"
cordova-plugin-cache-clear 1.3.7 "Cordova Cache Clear"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-code-push 1.11.18 "CodePush"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-device-orientation 1.0.7 "Device Orientation"
cordova-plugin-dialogs 1.3.4 "Notification"
cordova-plugin-facebook4 3.2.0 "Facebook Connect"
cordova-plugin-file 5.0.0 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-googleplus 5.3.2 "Google SignIn"
cordova-plugin-inappbrowser 2.0.2 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.4.1 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-taptic-engine 2.1.0 "Taptic Engine"
cordova-plugin-velda-devicefeedback 0.0.2 "DeviceFeedback"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.4 "SocialSharing"
cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
cordova-universal-links-plugin 1.2.1 "Universal Links Plugin"
es6-promise-plugin 4.2.2 "Promise"
phonegap-plugin-mobile-accessibility 1.0.5-dev "Mobile Accessibility"
phonegap-plugin-push 2.2.3 "PushPlugin"
AnastasiaKubova commented 5 years ago

Hi, @Yuripetusko. Please, try upgrading to the latest version of Cordova-android 8.0.0.

annakocheshkova commented 5 years ago

Hi @Yuripetusko. Unfortunately, this isn't something we can fix in our SDK. In the plugin, we only specify the lowest supported version of cordova-android. Supported Java version depends on it. But still, even in cordova-android 6.4.0, you should have JDK 1.8 installed, please refer to the cordova-android 6.4 documentation. I'm closing this issue for now, but feel free to re-open it if you have any more questions or need any help!