[Bug] Gradle build fails on Unity 2021 when custom gradle templates are enabled
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp, unity
- Domain
- build-system, mobile
Research direction
Reproduce the failure with the Analytics Quickstart in Unity 2021.2.6f1, enabling mainTemplate.gradle, launcherTemplate.gradle, baseProjectTemplate.gradle, and gradleTemplate.properties while disabling Auto Resolution. Start by examining the custom Gradle template configuration and the reported missing Firebase dependencies. Done means the Android APK builds successfully in this configuration.
Written by the indexing model from the issue text.
Description
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2021.2.6f1
- Firebase Unity SDK version: 8.6.2
- Source you installed the SDK: .unitypackage
- Problematic Firebase Component: Analytics
- Other Firebase Components in use: None
- Additional SDKs you are using: Facebook, None
- Platform you are using the Unity editor on: Mac
- Platform you are targeting: Android
- Scripting Runtime: IL2CPP
[REQUIRED] Please describe the issue here:
My APK fails during building gradle with following error:
CommandInvokationFailure: Gradle build failed.
/Applications/Unity/Hub/Editor/2021.2.6f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2021.2.6f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8FAILURE: Build failed with an exception.
- What went wrong:
Could not determine the dependencies of task ':unityLibrary:compileReleaseAidl'.Could not resolve all task dependencies for configuration ':unityLibrary:releaseCompileClasspath'.
Could not find com.google.firebase:firebase-analytics-unity:8.6.2.
Required by:
project :unityLibrary
Could not find com.google.firebase:firebase-app-unity:8.6.2.
Required by:
project :unityLibrary
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
What's the issue repro rate?
Yes, 100% when I enable mainTemplate.gradle and disable Auto Resolution in Android Resolver Settings.
What happened? How can we make the problem occur?
- Run Analaytics Quick start in Unity 2021.2.6f1.
- Enable mainTemplate.gradle, launcherTemplate.gradle, baseProjectTemplate.gradle and gradleTemplate.properties
- Build APK.
It builds fine If I don't enable gradle scripts and enable Auto Resolution.
It is also building without any problem on older Unity versions with custom gradle files.
- Dominant language
- C#
- Stars
- 923
- Forks
- 456
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/quickstart-unity
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
firebase/quickstart-unity#1448 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
firebase/quickstart-unity#1432 · 1 comment ·
-
new
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
firebase/quickstart-unity#1411 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
firebase/quickstart-unity#1403 · 1 comment ·
-
Firebase or specific Android versions trigger app_clear_data on first_open, disrupting our funnel Opennew
Difficulty 4/5 3-5 days Newbie friendliness 25/100
firebase/quickstart-unity#1390 · 1 comment ·
All issues in firebase/quickstart-unity
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·