Expo-source build error in AS


#1

Hey guys, I’m encountering an issue when trying to build my detached Expo project in AS. Was wondering if any else had encountered the same issue and had some insight on how to resolve it?

Project is freshly detached and running SDK15.

Here’s the error log:

Incremental java compilation is an incubating feature.
:app:buildInfoDebugLoader
:app:exponentPrebuildStep
./.expo-source/android/detach-scripts/prepare-detached-build.sh: line 4: exp: command not found

FAILED
:app:buildInfoGeneratorDebug

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:exponentPrebuildStep’.

Process ‘command ‘./.expo-source/android/detach-scripts/prepare-detached-build.sh’’ finished with non-zero exit value 127


Build /bin/sh Error after Ejecting 30.0.0
#2

looks like exp isn’t found, do you have it installed globally? if so, i guess your path isn’t properly set when executing that script


#3

Once you install exp globally (npm install -g exp), you can set the path by running exp path


#5

I’m getting similar error running android studio with expo. In android studio I get an error about the command ‘exp’ is not a recognizable command and then I get this

  • What went wrong:
    Execution failed for task ‘:app:exponentPrebuildStep’.

Process ‘command ‘cmd’’ finished with non-zero exit value 1

All in my gradle console. I’ve already installed expo globally. I don’t know how to make this error go away.


#6

@ajkhatibi i’m getting the exact same error . Did you find the solution ?


#7

Yeah I just bought a windows machine and ran it on a windows, did a couple of configurations and it worked for me.


#8

@ajkhatibi i am on windows :slight_smile: what kind of configurations did you do ? i’m not android expert. I think i just removed/unlinked react-native-keychain but i can’t redo this operation


#9

@flieks @ajkhatibi @adamjnav
There was a bug in this commit please refer to my comment wrote in issue. Check if your issue is related to this issue.


#10

I am still facing this issue, what did u guys do to manage working this? I am getting same error:
exponentPrebuildStep Error on android studio


#11

@dooboolab @adamjnav have u guys been able to solve this on Ubuntu


#12

@lulzimfazlija2
Sorry I’ve not tried this in ubuntu…
However, what you can try is just not to upgrade the gradle when android studio recommends you to update. Then you don’t have to do the above stuffs.


#13

I’m on a Mac and for some reason Android Studio isn’t reading my PATH correctly. I solved this issue by changing line 3 of android/detach-scripts/prepare-detached-build.sh to:

value=/usr/local/bin

Cheers,
Alvaro