Fastlane with Android

Hey, all. I’m trying to use Fastlane on Circle with my android builds. I thought this would be pretty easy - just make sure fastlane is up-to-date and invoke the command. But alas, no luck. The build is failing with “bash: line 1: fastlane: command not found”

To test this out, I made a really simple tweak to my circle.yml file. It now does the following:

# Make sure we have fastlane installed
- sudo gem update fastlane
# Test lanes
- fastlane lanes

But it still fails. I’ve tried manually installing fastlane via SSH (sudo gem install -V fastlane), and I get a ton of output followed by:

ERROR: Error installing fastlane:
net-ssh requires Ruby version >= 2.0.

I thought the circle machines had fastlane installed already. Any idea what I’m missing here?


I’ve tried certain things with SSH access but it looks like fastlane has a dependency issue. I’ve asked our Ruby specialist to take a look at it.


After discussion with zzak, it looks like the solution is to install fastlane in the script and cache the gem directory. This adds the following lines to the circle.yml:

- "/opt/circleci/.rvm/gems"
- gem install fastlane

After doing this, the fastlane command appears to be available and working. Thanks, all!

1 Like