software-mansion / react-native-svg

SVG library for React Native, React Native Web, and plain React web projects.
MIT License
7.51k stars 1.14k forks source link

Enhanced 'switch' blocks are not supported at language level '11' #2537

Closed Zcating closed 6 days ago

Zcating commented 6 days ago

Description

When I build my project. The AS shows the error: Enhanced 'switch' blocks are not supported at language level '11'.

Steps to reproduce

AS version: latest Error file: com.horcrux.svg.FeBlendView.java JDK Version: zulu-17

截屏2024-11-18 15 18 55

Snack or a link to a repository

none

SVG version

15.8.0

React Native version

0.72.4

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

github-actions[bot] commented 6 days ago

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

jakex7 commented 6 days ago

Hey @Zcating,

I've updated it in #2538, so it will be part of the next release. However, you should consider bumping the compileSdkVersion in your project to at least 34 to ensure compatibility with Java 17 instead of using Java 11.

You can find more details here: https://developer.android.com/build/jdks#compileSdk

Zcating commented 5 days ago

Thanks!
I also want to use the latest sugar.