regulaforensics / flutter_face_api

MIT License
31 stars 14 forks source link

App crash when use in release mode #15

Open sikaiichi opened 1 year ago

sikaiichi commented 1 year ago

Im install last version package, and my flutter version is 3.3.9 . The app worked at debug mode , but when use in release mode . It crash . Can u help me please . Hope to see u feedback soon .Thanks Tam

PavelMasuk commented 1 year ago

In example/android/app/src/main/AndroidManifest.xml add <uses-permission android:name="android.permission.INTERNET" /> right after the NFC permission. The issue will be fixes with next release. The problem is in the demo app, not plugin.

sikaiichi commented 1 year ago

I had already add . But not working . Why should you add NFC permission in here. I clone default source in pub.dev and release a app . But its still not work .

sikaiichi commented 1 year ago

im tried your way with demo app . And its worked . But when run will my project so run error like issue here https://github.com/regulaforensics/flutter_face_api/issues/13 . Error like that :

(use -source 8 or higher to enable default methods) /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_face_api-4.1.1/android/src/main/java/io/flutter/plugins/regula/faceapi/flutter_face_api/FlutterFaceApiPlugin.java:168: error: lambda expressions are not supported in -source 7 Instance().startLiveness(getContext(), (response) -> callback.success(JSONConstructor.generateLivenessResponse(response).toString())); ^ (use -source 8 or higher to enable lambda expressions) /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_face_api-4.1.1/android/src/main/java/io/flutter/plugins/regula/faceapi/flutter_face_api/JSONConstructor.java:458: 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) 3 errors

.Please tell my what my problem and how to fix that. Thanks @PavelMasuk

PavelMasuk commented 1 year ago

Looks like you are using java 7, we require at least java 8 to work with our library.

sikaiichi commented 1 year ago

Thanks . I fixed my issue . Im upgrade my version gradle from 4.1.0 to 7.2.0 that fixed