# Gradle Runner Step Failed: Android resource linking failed

**URL:** <https://discuss.bitrise.io/t/gradle-runner-step-failed-android-resource-linking-failed/17138>\
**Category:** Builds\
**Created:** [June 8, 2021, 9:58pm UTC](https://discuss.bitrise.io/t/gradle-runner-step-failed-android-resource-linking-failed/17138 "2021-06-08T21:58:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![intelivideoappdev](https://avatars.discourse-cdn.com/v4/letter/i/bc79bd/32.png) [@intelivideoappdev](https://discuss.bitrise.io/u/intelivideoappdev)\
**Post date:** [June 8, 2021, 9:58pm UTC](https://discuss.bitrise.io/t/gradle-runner-step-failed-android-resource-linking-failed/17138/1 "2021-06-08T21:58:04Z")

</div>

## Description of the issue

Platform: Android TV  
The issue is that an exception is raised when building an Android TV app. I have tried adding lines to gradle.properties and changing various things in build.gradle. I am not sure where to move from here. The APK is generated just fine when building locally without bitrise. I tried increasing the heap size, etc…

## Environment:

Android TV

Gradle Runner Step

## Reproducibility

Build URL: [https://app.bitrise.io/build/718ad6cbb6c2547e#?tab=log](https://app.bitrise.io/build/718ad6cbb6c2547e#?tab=log)

## Build.gradle

buildscript {

```
apply from: 'dependencies.gradle'

repositories {
    jcenter()
    google()
    maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
    mavenLocal()
}
dependencies {
    classpath 'com.android.tools.build:gradle:4.1.0' // THIS CANNOT GO PAST 3.5 DUE TO THE AMAZON EXOPLAYER LIBRARY FOR FIRE TV
    classpath 'com.google.gms:google-services:4.3.4'
    // Add the Firebase Crashlytics Gradle plugin.
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}

```

}

allprojects {  
repositories {  
google()  
jcenter()  
maven { url ‘[https://zendesk.jfrog.io/zendesk/repo](https://zendesk.jfrog.io/zendesk/repo)’ }  
mavenLocal()  
repositories {  
maven {  
name = “GitHubPackages”  
url = uri(“[https://maven.pkg.github.com/intelivideo/iv-android-sdk](https://maven.pkg.github.com/intelivideo/iv-android-sdk)”)  
credentials {  
username = “iv-sdk-user”  
password = “5ae73d5a1aacdba0a81746429dc5fbbeaab2b81c”  
}  
}  
}

```
}

```

}

task clean(type: Delete) {  
delete rootProject.buildDir  
}

## Gradle.properties

org.gradle.parallel=true  
kotlin.code.style=official  
android.enableJetifier=true  
org.gradle.jvmargs=-Xmx4608M -Dkotlin.daemon.jvm.options="-Xmx4608M"  
android.useAndroidX=true  
android.enableAapt2=true

## THIS ISSUE IS URGENT FOR OUR BUSINESS

---

<div class="post-metadata">

**Author:** ![intelivideoappdev](https://avatars.discourse-cdn.com/v4/letter/i/bc79bd/32.png) [@intelivideoappdev](https://discuss.bitrise.io/u/intelivideoappdev)\
**Post date:** [June 11, 2021, 4:23pm UTC](https://discuss.bitrise.io/t/gradle-runner-step-failed-android-resource-linking-failed/17138/2 "2021-06-11T16:23:40Z")

</div>

Also, our Android developer downloaded bitrise CLI and was able to build the app correctly through that, so why is it failing on [bitrise.io](http://bitrise.io)?

---

<div class="post-metadata">

**Author:** ![Roland-Bak](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/roland-bak/32/3480_2.png) [@Roland-Bak](https://discuss.bitrise.io/u/Roland-Bak)\
**Post date:** [June 16, 2021, 12:01pm UTC](https://discuss.bitrise.io/t/gradle-runner-step-failed-android-resource-linking-failed/17138/3 "2021-06-16T12:01:11Z")

</div>

Hello there @intelivideoappdev 👋

From the logs it seems that your app is trying to find files that don’t seem to be included in your repository. You mentioned your builds work locally without issues, could you please try to run your project in a clean git environment?

We have a guide for it here: [How to debug your build locally / "It works on my Mac/PC but not on bitrise.io"](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)

What is really important is to make sure you do this in the /tmp folder, as it will not use dependencies that have been gathered on your local machine beforehand, but only stuff that you include during the build. This will ensure that you will only use what you have marked as a dependency and can help pinpoint what might be missing 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [July 16, 2021, 12:01pm UTC](https://discuss.bitrise.io/t/gradle-runner-step-failed-android-resource-linking-failed/17138/4 "2021-07-16T12:01:13Z")

</div>

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