-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
error: pattern matching in instanceof is not supported in -source 8 #2347
Comments
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? |
@andrei-kopysov Hello, |
I got the same problem with @andrei-kopysov. it ran until I remove node_modules and reinstall. My java version: 19.0.2, gradle version: 7.6.3, react-native-svg: 15.3.0, react-native: 0.70.14 |
@thoadao0301 Can you provide an example? |
@bohdanprog I create an example like this
const {getDefaultConfig} = require('metro-config'); module.exports = (async () => {
The problem reports: |
Same issue, version 15.4.0 can not be compiled in Android. Use 15.3.0 working for me. |
Working in version 15.2.0, check your package.json use ~ instead ^ before version |
Hello @thoadao0301 @Geocld @andrei-kopysov, |
# Summary Closes #2347 Fixed a problem with building an Android app, pattern matching threw an error when we tried to build an Android app. [Repository](https://github.com/bohdanprog/react-native-svg-error-pattern-matching) to reproduce that error. ## Test Plan We can easily check that build the app. ### What are the steps to reproduce (after prerequisites)? build the app without that fix. ## Compatibility | OS | Implemented | | ------- | :---------: | | Android | ✅ |
15.3.0 Worked for me too building for Android on Ubuntu: "react": "18.1.0", |
Description
Cannot build project with react-native-svg 15.4.0
I am getting this error
> Task :react-native-svg:compileReleaseJavaWithJavac FAILED .../node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/FilterView.java:83: error: pattern matching in instanceof is not supported in -source 8 if (node instanceof FilterPrimitiveView currentFilter) { ^ (use -source 16 or higher to enable pattern matching in instanceof) 1 error
Steps to reproduce
yarn add react-native-svg 15.4.0
build project
project won't compile
Snack or a link to a repository
not needed
SVG version
15.4.0
React Native version
0.71.14
Platforms
macOS
JavaScript runtime
Hermes
Workflow
React Native
Architecture
None
Build type
Release app & production bundle
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: