Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library compile issue (Android) #30

Closed
KushaanKapoor opened this issue Mar 12, 2022 · 3 comments · Fixed by #32
Closed

Library compile issue (Android) #30

KushaanKapoor opened this issue Mar 12, 2022 · 3 comments · Fixed by #32

Comments

@KushaanKapoor
Copy link

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?

@Almouro
Copy link
Member

Almouro commented Mar 14, 2022

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

@Almouro
Copy link
Member

Almouro commented Mar 17, 2022

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

I'll post a fix tonight!

@Almouro
Copy link
Member

Almouro commented Mar 17, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants