I'am trying to run my react native expo project in android and it's shows me this error

41 Views Asked by At

I'am trying to run my react native expo project in android and it's shows me this error

macbookpro@macbooks-MacBook-Pro appv2 % npx expo run:android --device
✔ Select a device/emulator › Pixel_6_Pro (device)
› Using --device Pixel_6_Pro
› Building app...
Configuration on demand is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'appv2'.
> Could not open cp_proj generic class cache for build file '/Users/macbookpro/Documents/GitHub/appv2/android/build.gradle' (/Users/macbookpro/.gradle/caches/8.3/scripts/f4c1320ij7nr1ls7oyh73uai8).
   > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66

* 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.

BUILD FAILED in 6s
Error: /Users/macbookpro/Documents/GitHub/appv2/android/gradlew exited with non-zero code: 1
Error: /Users/macbookpro/Documents/GitHub/appv2/android/gradlew exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/macbookpro/Documents/GitHub/appv2/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5)
    ...
    at Object.spawnAsync [as default] (/Users/macbookpro/Documents/GitHub/appv2/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
    at spawnGradleAsync (/Users/macbookpro/Documents/GitHub/appv2/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:72:46)
    at Object.assembleAsync (/Users/macbookpro/Documents/GitHub/appv2/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:52:18)
    at runAndroidAsync (/Users/macbookpro/Documents/GitHub/appv2/node_modules/@expo/cli/build/src/run/android/runAndroidAsync.js:36:24)
0

There are 0 best solutions below