Skip to content

Android builds from Export, Unity 2019.3.10f1, unityLibrary Could not find any firebase jar or aar #830

@quinnhoener

Description

@quinnhoener

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2019.3.10f1
  • Firebase Unity SDK version: 6.16.0
  • Source you installed the SDK: UPM
  • Problematic Firebase Component: Firebase App, Analytics, Crashlytics, Instance ID, Messaging
  • Other Firebase Components in use: same as above
  • Additional SDKs you are using: Facebook, Braze, Helpshift
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: Android
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Install Firebase using Unity Package Manager.

Our build process includes exporting the android job, and then building from the export. The thing is that they could be on 2 different machines. I think what's happening is this line to get packages using the GeneratedLocalRepo isn't finding that folder anymore. Oddly enough the errors produced don't even show this folder as being searched.

def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")

Errors

* What went wrong:
Could not determine the dependencies of task ':launcher:lintVitalRelease'.
> Could not resolve all task dependencies for configuration ':launcher:releaseRuntimeClasspath'.
   > Could not find com.google.firebase:firebase-analytics-unity:6.16.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-analytics-unity/6.16.0/firebase-analytics-unity-6.16.0.pom
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-analytics-unity/6.16.0/firebase-analytics-unity-6.16.0.jar
       - https://jcenter.bintray.com/com/google/firebase/firebase-analytics-unity/6.16.0/firebase-analytics-unity-6.16.0.pom
       - https://jcenter.bintray.com/com/google/firebase/firebase-analytics-unity/6.16.0/firebase-analytics-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-analytics-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-analytics-unity.jar
     Required by:
         project :launcher > project :unityLibrary
   > Could not find com.google.firebase:firebase-app-unity:6.16.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-app-unity/6.16.0/firebase-app-unity-6.16.0.pom
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-app-unity/6.16.0/firebase-app-unity-6.16.0.jar
       - https://jcenter.bintray.com/com/google/firebase/firebase-app-unity/6.16.0/firebase-app-unity-6.16.0.pom
       - https://jcenter.bintray.com/com/google/firebase/firebase-app-unity/6.16.0/firebase-app-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-app-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-app-unity.jar
     Required by:
         project :launcher > project :unityLibrary
   > Could not find com.google.firebase:firebase-crashlytics-unity:6.16.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-crashlytics-unity/6.16.0/firebase-crashlytics-unity-6.16.0.pom
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-crashlytics-unity/6.16.0/firebase-crashlytics-unity-6.16.0.jar
       - https://jcenter.bintray.com/com/google/firebase/firebase-crashlytics-unity/6.16.0/firebase-crashlytics-unity-6.16.0.pom
       - https://jcenter.bintray.com/com/google/firebase/firebase-crashlytics-unity/6.16.0/firebase-crashlytics-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-crashlytics-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-crashlytics-unity.jar
     Required by:
         project :launcher > project :unityLibrary
   > Could not find com.google.firebase:firebase-instance-id-unity:6.16.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-instance-id-unity/6.16.0/firebase-instance-id-unity-6.16.0.pom
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-instance-id-unity/6.16.0/firebase-instance-id-unity-6.16.0.jar
       - https://jcenter.bintray.com/com/google/firebase/firebase-instance-id-unity/6.16.0/firebase-instance-id-unity-6.16.0.pom
       - https://jcenter.bintray.com/com/google/firebase/firebase-instance-id-unity/6.16.0/firebase-instance-id-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-instance-id-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-instance-id-unity.jar
     Required by:
         project :launcher > project :unityLibrary
   > Could not find com.google.firebase:firebase-messaging-unity:6.16.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-messaging-unity/6.16.0/firebase-messaging-unity-6.16.0.pom
       - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-messaging-unity/6.16.0/firebase-messaging-unity-6.16.0.jar
       - https://jcenter.bintray.com/com/google/firebase/firebase-messaging-unity/6.16.0/firebase-messaging-unity-6.16.0.pom
       - https://jcenter.bintray.com/com/google/firebase/firebase-messaging-unity/6.16.0/firebase-messaging-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-messaging-unity-6.16.0.jar
       - file:/private/var/gitlabrunner/buildbot1/workspace/builds/dPgRfzh4/0/projectName/client/projectName/Temp/gradleOut/unityLibrary/libs/firebase-messaging-unity.jar
     Required by:
         project :launcher > project :unityLibrary

mainTemplate.gradle

  repositories {
    google()
    jcenter()
  }

  dependencies {
    classpath 'com.android.tools.build:gradle:3.4.0'
  }
}

allprojects {
  repositories {
    mavenLocal()
    jcenter()
    flatDir {
      dirs 'libs'
    }
    google()
  }
}

// Android Resolver Repos Start
([rootProject] + (rootProject.subprojects as List)).each { project ->
    project.repositories {
        def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
        maven {
            url "https://maven.google.com"
        }
        maven {
            url (unityProjectPath + "/Assets/GeneratedLocalRepo/Firebase/m2repository") // Packages/com.google.firebase.app/Firebase/Editor/AppDependencies.xml:22, Packages/com.google.firebase.messaging/Firebase/Editor/MessagingDependencies.xml:20, Packages/com.google.firebase.crashlytics/Firebase/Editor/CrashlyticsDependencies.xml:20, Packages/com.google.firebase.instance-id/Firebase/Editor/InstanceIdDependencies.xml:20, Packages/com.google.firebase.analytics/Firebase/Editor/AnalyticsDependencies.xml:18
        }
        mavenLocal()
        jcenter()
        mavenCentral()
    }
}
// Android Resolver Repos End
apply plugin: 'com.android.library'
**APPLY_PLUGINS**

dependencies {
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'com.google.android.gms:play-services-gcm:16.0.0'
    implementation 'com.google.android.gms:play-services-identity:16.0.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.google.android.gms:play-services-safetynet:16.0.0'
    implementation 'com.neovisionaries:nv-websocket-client:2.5'

    implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
    implementation 'com.android.support:appcompat-v7:25.3.1' 
    implementation 'com.android.support:cardview-v7:25.3.1' 
    implementation 'com.android.support:cardview-v7:26.0.2' 
    implementation 'com.android.support:customtabs:25.3.1' 
    implementation 'com.android.support:design:26.0.2' 
    implementation 'com.android.support:recyclerview-v7:26.0.2' 
    implementation 'com.android.support:support-v4:25.3.1' 
    implementation 'com.facebook.android:facebook-applinks:[6.2.0, 7)' 
    implementation 'com.facebook.android:facebook-core:[6.2.0, 7)' 
    implementation 'com.facebook.android:facebook-gamingservices:[6.2.0, 7)' 
    implementation 'com.facebook.android:facebook-login:[6.2.0, 7)' 
    implementation 'com.facebook.android:facebook-share:[6.2.0, 7)' 
    implementation 'com.google.android.gms:play-services-base:17.4.0' 
    implementation 'com.google.firebase:firebase-analytics:17.5.0' 
    implementation 'com.google.firebase:firebase-analytics-unity:6.16.0' 
    implementation 'com.google.firebase:firebase-app-unity:6.16.0' 
    implementation 'com.google.firebase:firebase-common:19.3.1' 
    implementation 'com.google.firebase:firebase-crashlytics:17.0.0' 
    implementation 'com.google.firebase:firebase-crashlytics-unity:6.16.0' 
    implementation 'com.google.firebase:firebase-iid:20.2.4' 
    implementation 'com.google.firebase:firebase-instance-id-unity:6.16.0' 
    implementation 'com.google.firebase:firebase-messaging:20.2.4' 
    implementation 'com.google.firebase:firebase-messaging-unity:6.16.0' 
    implementation 'com.parse.bolts:bolts-android:1.4.0' 
// Android Resolver Dependencies End
**DEPS**}

//Exclude transitive dependencies that are already present as aar files
configurations {
  implementation.exclude group: 'com.android.installreferrer', module: 'installreferrer'
}


// Android Resolver Exclusions Start
android {
  packagingOptions {
      exclude ('/lib/armeabi/*' + '*')
      exclude ('/lib/mips/*' + '*')
      exclude ('/lib/mips64/*' + '*')
      exclude ('/lib/x86/*' + '*')
      exclude ('/lib/x86_64/*' + '*')
  }
}
// Android Resolver Exclusions End
android {
    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        minSdkVersion **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        ndk {
            abiFilters **ABIFILTERS**
        }
        multiDexEnabled true
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
        consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
    }

    lintOptions {
        abortOnError false
    }

    aaptOptions {
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**PACKAGING_OPTIONS**
}**REPOSITORIES****SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
I have not tried just a blank quickstart project of firebase on our build machines, but I have tried a blank project running locally with Firebase and doing unity's "Build and Run" to device works fine.

What's the issue repro rate? (eg 100%, 1/5 etc)
5/5 on build machines

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions