Open Gizmo1337 opened 1 year ago
Update this file gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip . it worked to me
just changed gradle version to 7.1.2
like
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
}
and gradle-wrapper.properties to 7.4
like
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
fixed my problem
Before Submitting, be sure to
Bug Description
Cannot build on existing project getting -source 7 error. Only for Flutter Android, Works on iOS
Tried multiple JDK's from 8 , 11, 19;
Current buildGradle : android { compileSdkVersion 33 // ndkVersion "25.1.8937393" // compileOptions { // sourceCompatibility JavaVersion.VERSION_1_8 // targetCompatibility JavaVersion.VERSION_1_8 // }
defaultConfig {
As soon as I commnet face_api from pubspec it all works.
Steps To Reproduce
Expected behavior
For the app to build, tried the same Android config from Demo, used JDK 8, 11, 19
Environment:
Additional context Error Logs: /Users/u/.pub-cache/hosted/pub.dev/flutter_face_api-5.1.1/android/src/main/java/io/flutter/plugins/regula/faceapi/flutter_face_api/FlutterFaceApiPlugin.java:74: error: default methods are not supported in -source 7 default void success() { ^ (use -source 8 or higher to enable default methods) /Users/u/.pub-cache/hosted/pub.dev/flutter_face_api-5.1.1/android/src/main/java/io/flutter/plugins/regula/faceapi/flutter_face_api/FlutterFaceApiPlugin.java:120: error: lambda expressions are not supported in -source 7 new Handler(Looper.getMainLooper()).post(() -> eventVideoEncoderCompletion.success(JSONConstructor.generateVideoEncoderCompletion(transactionId, success).toString())); ^ (use -source 8 or higher to enable lambda expressions) /Users/u/.pub-cache/hosted/pub.dev/flutter_face_api-5.1.1/android/src/main/java/io/flutter/plugins/regula/faceapi/flutter_face_api/FlutterFaceApiPlugin.java:291: error: method references are not supported in -source 7 Instance().setVideoEncoderCompletion(this::sendVideoEncoderCompletion); ^ (use -source 8 or higher to enable method references) /Users/u/.pub-cache/hosted/pub.dev/flutter_face_api-5.1.1/android/src/main/java/io/flutter/plugins/regula/faceapi/flutter_face_api/JSONConstructor.java:647: error: method references are not supported in -source 7 result.put("detections", generateList(input.getDetections(), JSONConstructor::generateMatchFacesDetection)); ^ (use -source 8 or higher to enable method references) 4 errors
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':flutter_face_api:compileDebugJavaWithJavac'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 4s Exception: Gradle task assembleDebug failed with exit code 1