OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

React Native error can anyone tell me the solution [closed]

  • Thread starter Thread starter SIBASIS'
  • Start date Start date
S

SIBASIS'

Guest
Code:
> Task :react-native-picker_picker:compileDebugJavaWithJavac FAILED
D:\SIPFUND\SipFund\node_modules\@react-native-picker\picker\android\src\main\java\com\reactnativecommunity\picker\ReactPicker.java:144: error: lambda expressions are not supported in -source 7
  private final Runnable measureAndLayout = () -> {
                                               ^
  (use -source 8 or higher to enable lambda expressions)
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-picker_picker:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 36s
591 actionable tasks: 6 executed, 585 up-to-date
D:\SIPFUND\SipFund\android\gradlew.bat exited with non-zero code: 1
Error: D:\SIPFUND\SipFund\android\gradlew.bat exited with non-zero code: 1
    at ChildProcess.completionListener (D:\SIPFUND\SipFund\node_modules\@expo\spawn-async\src\spawnAsync.ts:65:13)
    at Object.onceWrapper (node:events:628:26)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess.cp.emit (D:\SIPFUND\SipFund\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
    ...
    at spawnAsync (D:\SIPFUND\SipFund\node_modules\@expo\spawn-async\src\spawnAsync.ts:26:19)
    at spawnGradleAsync (D:\SIPFUND\SipFund\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:83:28)
    at assembleAsync (D:\SIPFUND\SipFund\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:57:16)
    at actionAsync (D:\SIPFUND\SipFund\node_modules\expo-cli\src\commands\run\android\runAndroid.ts:145:22)

I am Using JDK 11 node 16 getting this error while trying to run this build.
<pre class="lang-none prettyprint-override"><code>> Task :react-native-picker_picker:compileDebugJavaWithJavac FAILED
D:\SIPFUND\SipFund\node_modules\@react-native-picker\picker\android\src\main\java\com\reactnativecommunity\picker\ReactPicker.java:144: error: lambda expressions are not supported in -source 7
private final Runnable measureAndLayout = () -> {
^
(use -source 8 or higher to enable lambda expressions)
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-picker_picker:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 36s
591 actionable tasks: 6 executed, 585 up-to-date
D:\SIPFUND\SipFund\android\gradlew.bat exited with non-zero code: 1
Error: D:\SIPFUND\SipFund\android\gradlew.bat exited with non-zero code: 1
at ChildProcess.completionListener (D:\SIPFUND\SipFund\node_modules\@expo\spawn-async\src\spawnAsync.ts:65:13)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (D:\SIPFUND\SipFund\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
...
at spawnAsync (D:\SIPFUND\SipFund\node_modules\@expo\spawn-async\src\spawnAsync.ts:26:19)
at spawnGradleAsync (D:\SIPFUND\SipFund\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:83:28)
at assembleAsync (D:\SIPFUND\SipFund\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:57:16)
at actionAsync (D:\SIPFUND\SipFund\node_modules\expo-cli\src\commands\run\android\runAndroid.ts:145:22)
</code></pre>
<p>I am Using JDK 11 node 16
getting this error while trying to run this build.</p>
Continue reading...
 
Top