Building with Expokit and MS Mobile Center

I am currently trying MS Mobile Center as the solution to a problem on how to build detached iOS on Windows. I’ve started with Android though as I cannot get ios project on Windows. I already solved couple of problems on the way, but currently I cannot get through this one…

2017-08-31T20:25:59.7414100Z Execution failed for task ‘:app:exponentPrebuildStep’.
2017-08-31T20:25:59.7429660Z > A problem occurred starting process ‘command ‘./.expo-source/android/detach-scripts/’’

Here are full logs for download …

And here is a full project that I am trying to build … … which is result of running these commands:

yarn run eject (with expokit)
yarn add mobile-center
react-native link

Side note: It’s necessary to add exception to .gitignore for *.jar files as those are needed for build

Setting up Mobile Center is pretty straightforward, not really much of the settings to care about.


What happens if you just go to a terminal and run ./.expo-source/android/detach-scripts/ with the same arguments given in the build hook?

As I said, I am on Windows. I cannot run shell script :slight_smile: But thanks for quick answer. I hope there is some quick and dirty solution to this.

Oh, there is actually *.bat file too. Well, I tried to run that, it essentially just runs exp prepare-detached-build --platform android but that does almost nothing except adding DEVELOPMENT_URL to

I also tried to run command that’s in previous step there… android/gradlew -p android clean :app:assembleRelease which ends up with different error message. Probably not related to Expo itself, but not sure what it means either :confused:

Compiling with JDK Java compiler API.
:mobile-center:compileReleaseJavaWithJavac FAILED
:mobile-center:compileReleaseJavaWithJavac (Thread[main,5,main]) completed. Took 1.165 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:mobile-center:compileReleaseJavaWithJavac’.

Could not find tools.jar

So I have finally managed to finish build for Android locally. However, the Mobile Center is still with the same error as described in the first post. I’ll try to communicate with maintainers of it, but it’s hard to say where is an actual problem. It’s a shame, it was looking like a good solution how to automate builds.

@ben So I have finally figured it out. Digging deeper and looking what this prepare step actually does I found out that it only sets DEVELOPMENT_URL in some java file. Obviously, this is not needed when building release :slight_smile: So I simply removed this step from build.gradle and now it works. Yay!

Anyway, there is apparently some problem with Mobile Center and that it fails to run this detach script for some reason. Hopefully, I’ll get some answers from developers during the week.

1 Like