Gradle Runner Step Failed: Android resource linking failed

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

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’ }
mavenLocal()
repositories {
maven {
name = “GitHubPackages”
url = uri(“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

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?

Hello there @intelivideoappdev :wave:

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"

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 :slight_smile:

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