Not able to generate apk file at gradlew step - Java + Kotlin project

Bitrise Build Issue Report template

Description of the issue

Our team uses both java and kotlin in our android code base. When I am trying to generate a binary file I am getting below error:
FAILURE: Build failed with an exception.

Environment:

Where did the issue happen?

Android and Docker, on Ubuntu 16.04

Which build Step causes the issue and which version of the step?

Gradlew

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : YES
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : YES
  • Does the issue happen sporadically, or every time? : everytime.
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : From the beginning of time

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( Bitrise CLI )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: Redirecting… .

Build log

Please copy paste the build’s bitrise.io URL here (or if the issue happens somewhere else then the full logs), or if you can’t share the url / log here then send the url or full log through a private channel (e.g. email - Contact us ), with a link to the related Discuss issue.

Stack Trace:

FAILURE: Build failed with an exception.
** What went wrong:*
Could not determine the dependencies of task ‘:appinjector:kaptDevReleaseKotlin’.
> Could not resolve all files for configuration ‘:appinjector:kotlinCompilerClasspath’.
_ > Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.2.71._
_ Required by:_
_ project :appinjector_
_ > Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.2.71._
_ > Could not get resource ‘http://artifactory.mfsbe.com/artifactory/libs-snapshot-local/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.2.71/kotlin-compiler-embeddable-1.2.71.pom’._
_ > Could not HEAD ‘http://artifactory.mfsbe.com/artifactory/libs-snapshot-local/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.2.71/kotlin-compiler-embeddable-1.2.71.pom’._
_ > Connect to artifactory.mfsbe.com:80 [artifactory.mfsbe.com/10.211.1.241] failed: connect timed out_

I tried below, but didn’t work:

  1. Installed Kotlin from shell step and set it as an env variable.
    My potential guess of what could work:
  2. Make Android studio install require kotlin plugin. Not sure how to do this.

I welcome your suggestions on any alternative approach to.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.