BitBucket Pipelines Gradle build for Android - failed

My settings:

image: uber/android-build-environment:latest

pipelines:
  default:
    - step:
        script:
          - mkdir "${ANDROID_HOME}/licenses" || true
          - echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > "${ANDROID_HOME}/licenses/android-sdk-license"
          - bash ./gradlew build crashlyticsUploadDistributionRelease

FAILURE: Build failed with an exception.
* Where:
Build file '/opt/atlassian/pipelines/agent/build/build.gradle' line: 52
* What went wrong:
A problem occurred evaluating root project 'build'.
> For input string: ""

 

What could be the cause of the error. Looks like that is something wrong on server.

1 answer

0 vote

Hey @Miłosz Skalski

Everything looks correct, the only thing I'm not sure about is how you invoke the gradle wrapper; if you turn that last line into

bash -c "./gradlew build crashlyticsUploadDistributionRelease"

 does that improve it? I'm thinking that the arguments "build" and "crashlyticsUploadDistributionRelease" are going to bash, not to gradlew

 

-Seb

Hey @Sebastian Cole

The problem is not related with:  crashlyticsUploadDistributionRelease.

Problem occurs related with don't installed git on image. Always when I commit something I counts commits.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,258 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you