bamlab / react-native-flipper-performance-monitor

An attempt to have a lighthouse for React Native. Flipper plugin to show a graph of the React Native performance monitor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Library compile issue (Android)

KushaanKapoor opened this issue · comments

error: lambda expressions are not supported in -source 1.7
mainHandler.post(() -> promise.resolve(fibonacci(intensity)));
^
(use -source 8 or higher to enable lambda expressions)
1 error

FAILURE: Build failed with an exception.

I am getting this when trying to build the app on my android device. Any solutions?

Hi @KushaanKapoor, thanks for posting an issue!

It sounds like you're using Java 7, an old version of Java, could that be the issue? What does java -version return and which OS are you using?

On this page https://reactnative.dev/docs/next/environment-setup, you should find a way to install a Java version that's suitable for React Native

Otherwise, you might have those 2 lines in your project:

compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

forcing you to use Java 7. If that's the case, I think you can just remove them, they're not in the default RN template anymore

Actually never mind, I just encountered this bug myself despite having proper Java versions.

I'll post a fix tonight!

@KushaanKapoor should be fixed in v0.2.1 of react-native-flipper-performance-plugin
Feel free to reopen if this is not the case :)