0

======

  • cocoapods-1.16.2
  • Unity 6000.0.41f1
  • Firebase 13.4.0
  • OSX 15.5

ISSUES:

Android: not building

> Could not resolve all files for configuration ':launcher:debugRuntimeClasspath'.
  > Could not find com.google.firebase:firebase-analytics-unity:13.4.0.
    Searched in the following locations:
   - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-analytics-unity/13.4.0/firebase-analytics-unity-13.4.0.pom

What I’ve tried:

  • updated firebase
  • update cocoa pods (I have a separate iOS issue)
  • forced resolve in EDMU Various EDMU settings.
  • Update google-services
  • files for iOS and android checked the version inside the podfile, its correct
  • CheckedUnityAppController.mm there no mention of firebase

I know there are lots of posts with similar errors, however each has a completely different solution and I'm trying to narrow it down.

It seems like something explicitly declares firebase-analytics-unity as a Maven dependency.

I believe the "-unity" packages aren't on Maven only native Android Firebase packages (without -unity).

When I look at the build.gradle I see:

Packages/com.google.firebase.analytics/Firebase/Editor/AnalyticsDependencies.xml:13 implementation 'com.google.firebase:firebase-analytics-unity:13.4.0'

ie its looking for files on maven, which is should be getting from GeneratedLocalRepo

Now this can happen when try and mix installation methods for Firebase.

I installed the latest firebase via package manager. However the package removal instructions [here][1] seem incomplete. ie Firebase is leaving files all over my project, that aren't mentioned here.

3 questions:

  • Is the maven vs local Repository the likely source of my error?
  • Is it ultimately caused by not removing all files from the .unitypackage installation?
  • If so how do
    • I find any stray files I could have missed?
    • ensure I only have the unity package manager installation.
5
  • Before going any further, please try to run though Debugging the Game Build, Install and Run Process and responding back with what you find. From there, it will be easier to figure out what might be going on. Commented Nov 12 at 22:11
  • Hey Joe, how about before going any further you fix you build process? I've seen you post this "solution" multiple times, including when I reported a similar issue months ago. Why do you keep posting to article that suggests about 20 different things? Its almost entirely irrelevant to what I've asked. I gave VERY specific indications of the issue. Given that similar issue is all over the internet, so you think google might FIX ITS BUILD PROCESS? Commented Nov 13 at 15:42
  • As it stands, EDM4U and the Firebase SDK for Unity attempt to be backwards compatible to many versions of Unity on different OS over many years. While automatically applying the fixes would be ideal, Unity's Gradle pipeline and the way end users customize it have changed greatly over time. This diagnostic has been the most successful way for many people both on posts and in DMs to debug by starting from a known state and attempting a series of systematic checks and fixes. I didn't post it as a solution because I'm planning to try to help you after getting some more info from this. Commented Nov 13 at 15:59
  • I see you've found a workaround and I'm happy to hear you've gotten it working. I'm sorry to hear that EDM4U and your workflow are getting in each others way. It's often very difficult for us to recreate build issues found in the wild without a little more information and a mimimal reproducible example. If you're interested in telling us a little more, please file an issue at the EDM4U Github or if you have a solution, please feel free to send a PR. In either case we will triage the submission and see how we can improve. Commented Nov 13 at 16:05
  • Hey Joe, you didn't ask for a build, you asked my to go through a series of tests that would take days, and I already know, and so would you if took some time, that most of it is irrelevant. I don't know what a PR but I can sen you my project via dropbox if it would help other people. Commented yesterday

1 Answer 1

0

So I've found a work around.

To get it to build on Android:

1. Edit the mainTemplate.gradle to only reference BoM and whatever Firebase dependencies:

Like this:

  // Import the Firebase BoM
  implementation(platform("com.google.firebase:firebase-bom:34.5.0"))

  // When using the BoM, you don't specify versions in Firebase library dependencies
  // Add the dependency for the Firebase SDK for Google Analytics
  implementation("com.google.firebase:firebase-analytics")
  // See https://firebase.google.com/docs/android/setup#available-libraries
  implementation("com.google.firebase:firebase-crashlytics")

2. And remove specific references like this:

// Android Resolver Dependencies Start
    implementation 'androidx.appcompat:appcompat:1.1.0' // Packages/com.unitynative.sharing/Editor/UnityNativeSharingDependencies.xml:7
    implementation 'com.google.android.gms:play-services-base:18.9.0' // Packages/com.google.firebase.app/Firebase/Editor/AppDependencies.xml:17
    implementation 'com.google.firebase:firebase-analytics:23.0.0' // Packages/com.google.firebase.analytics/Firebase/Editor/AnalyticsDependencies.xml:13
    implementation 'com.google.firebase:firebase-analytics-unity:13.4.0' // Packages/com.google.firebase.analytics/Firebase/Editor/AnalyticsDependencies.xml:18
    implementation 'com.google.firebase:firebase-app-unity:13.4.0' // Packages/com.google.firebase.app/Firebase/Editor/AppDependencies.xml:22
    implementation 'com.google.firebase:firebase-common:22.0.1' // Packages/com.google.firebase.app/Firebase/Editor/AppDependencies.xml:13
    implementation 'com.google.firebase:firebase-crashlytics-ndk:20.0.3' // Packages/com.google.firebase.crashlytics/Firebase/Editor/CrashlyticsDependencies.xml:13
    implementation 'com.google.firebase:firebase-crashlytics-unity:13.4.0' // Packages/com.google.firebase.crashlytics/Firebase/Editor/CrashlyticsDependencies.xml:20
// Android Resolver Dependencies End

Annoyingly every time you run Googles External Dependency manager it breaks the mainTemplate.gradle.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.