0

Hi I use this Library in my app for take picture Camera2 I set the camera in my app but I have a problem with this part of code

captureBitmap(bitmap -> {
                    new Handler().post(() -> {
                        String imagePath = getImageFilePath();
                        saveAsPngImage(bitmap, imagePath);
                        exportPngToGallery(getApplicationContext(), imagePath);
                    });
                });`

When I paste it on my code it says me this

Lambda expressions are not supported at language level '1.7

So I change my java Language for 1.8 but after I did this my build failed with this error

Process 'command 'C:\Program Files\Android\Android Studio\jre\bin\java.exe'' finished with non-zero exit value 1

And now I'm stuck with this . So if anyone know who can I use the captureimage void without uptade my Language it would be great thanks

Fredrik Widerberg
  • 3,068
  • 10
  • 30
  • 42
  • have you tried these? 1. https://stackoverflow.com/questions/22703412/java-lambda-expressions-not-supported-at-this-language-level 2. https://stackoverflow.com/questions/29045129/android-java-exe-finished-with-non-zero-exit-value-1 – Bharath Kumar Jul 20 '18 at 15:38
  • Yes already but I just want use this void –  Jul 20 '18 at 15:44
  • Although it sounds weird, could you try it again after each step: 1. Free up some RAM by closing programs 2. Closing Android Studio and reboot your PC/laptop. – Bharath Kumar Jul 20 '18 at 17:04

0 Answers0