gradlew exited with non-zero code: 1 in viro react

4.1k Views Asked by At

I followed every steps from this documentation. But when I run the expo app following errors showed up. enter image description here

I am suffering from this problem since 1 week. Please Help.

2

There are 2 best solutions below

0
Kurt VanDusen On

It could be because react-viro has "peerDependencies": "react-native": "0.65.1".

I am trying expo version 44.0.0 because it uses react-native version 0.64.3.

Also, React-viro requires the deprecated jcenter() repository in the build.gradle for support of exoplayer 2.7.1 which viro uses. This has been removed from newer versions of react-native. It can manually be added:

android/build.gradle

...
 buildscript
  { repositories
    {
      jcenter() // <- Add this line
...
 allprojects
  {
    repositories
      {
        jcenter() // <- Add this line
1
Meriç Akay On

I tried the following steps

  • rm -rf yarn.lock node_modules .expo package-lock.json
  • yarn install
  • expo upgrade