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/prepare-detached-build.sh’’
What happens if you just go to a terminal and run ./.expo-source/android/detach-scripts/prepare-detached-build.sh with the same arguments given in the build hook?
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 ExponentBuildConstants.java.
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
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’.
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 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.