Error when initialising remote build on android studio


First of all this Multi OS Engine looks promising. I hope it can be continued and updated.

I have a problem when trying to initalise the remote build. I am setting up the remote build on my mac and i believe ive been following the instructions to the word from the documentation. However i cant seem to get it initialise successfuly. It returns many errors when i click “test”. Any suggestion please?


It looks like you are on Windows, so what’s up with these $sys$user.home in the path? It says a file not found exception for the id_rsa file. Verify that it is there and try again?

Also (just incase you run into that next) I’m on Windows and was told to use the regular login.keychain instead of an own moeremotebuild keychain. I guess they never put that in the documentation.

Hi sorry for the late reply. Im sure the file is available. Is $sys$user.home correct path?20180509_083413|690x387

I have my path like this:

Hi Leejjon,

Thank you for the reply. Im confuse now.

  1. Im following the official tutorial ( and get the multiOS sample from Am I using the wrong example? Or perhaps any clearer example and step-by-step tutorial I can follow?

  2. As far as I can understand to debug / run the app in IOS, i would need to have my Mac and my PC on the same network then the Android Studio on my PC will remotely call the signature etc from the Mac which then compiled back to the Android Studio. Am I understanding this correctly? If so, then the identity is supposed to be the path on Mac?

  3. Anyway, I tried to modify as suggested but seems still be error
    CaptureError 2.

Thank you

The documentation is outdated on some points and I don’t think there are other super clear tutorials out there.

I don’t work for Migeran but I think it works like:

  • Your Android Studio on Windows compiles the java code.
  • The MOE plugin for Android studio runs a gradle script.
  • That gradle script runs the MOE gradle plugin with the remotebuild task.
  • The MOE remote build task opens an SSH connection to your mac. This doesn’t need to be on the same network. In my case it is, but I think you can connect to a mac on the other side of the world (it’s just not practial because I sometimes need to run from the mac itself).
  • Via the SSH connection your compiled java code is copied to the mac.
  • Via the SSH connection the xcode project is compiled (the objective c bindings etc) & signed on the mac.
  • Via the SSH connection the compiled appp is copied back to your Windows PC.
  • Via some library in iTunes on windows the moe-gradle plugin deploys your app on the iphone connected to your Windows PC.

About the identity, I’m not that good with the terminoligy of these things, but you need to generate an ssh key on the mac (tip, do NOT put a passphrase on it, the moe gradle plugin will give errors) the moe documentation points to:

Add that SSH key to the login keychain (according to your screenshot you’re using the moeremotebuild keychain from the documentation, I personally could not get that to work, see Connection error when setting up remote build [FIXED, never mind]) and then copy the private key file to the windows computer (in your case to the folder C:\Users\mario\.ssh\yourprivatekey and put that path in the identity field in the intellij plugin. And in the field enter “login.keychain”

If you have any problems connecting first just try to connect with an SSH client like putty using the private key you created to make sure the settings on your mac allow remote ssh.

To figure my configuration out it took me a few weeks (spent some hours some evenings) to fork the moe-gradle-plugin and debug to find out how it worked. I also had some tips from the MOE guys on this forum.

Hope this helps.

1 Like

Hi Leejjon,

Thank you for your help. Will check it out. By any chance you can recommend any clearer and updated step-by-step tutorials on this please? Would be beneficial for beginners like myself