Lambda functions not compiling for android
This is not (necessarily) a bug in this code, but a compatibility issue, someone may have run into.
When i try to build my ionic4 project in android studio I'm getting this error
2019/platforms/android/app/src/main/java/de/appplant/cordova/plugin/printer/Printer.java:91: error: lambda expressions are not supported in -source 1.7 cordova.getThreadPool().execute(() -> { ^ (use -source 8 or higher to enable lambda expressions)
the funny thing is i'm using 8. JAVA_HOME = /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home
also in
compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }
My system info: Ionic:
Ionic CLI : 5.4.16 Ionic Framework : @ionic/angular 4.11.10 @angular-devkit/build-angular : 0.801.3 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.0.0
Cordova:
Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : android 8.1.0, ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.2, (and 11 other plugins)
Utility:
cordova-res (update available: 0.11.0) : 0.8.1 native-run : not installed
System:
ios-sim : 8.0.2 NodeJS : v10.9.0 (/usr/local/bin/node) npm : 6.14.4 OS : macOS Mojave Xcode : Xcode 11.3.1 Build version 11C504
Matching Java Virtual Machines (2): 14, x86_64: "Java SE 14" /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home 1.8.0_241, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home
appreciate any help anyone can offer
Did you find any solution?