-
Notifications
You must be signed in to change notification settings - Fork 445
Closed
Description
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2020.1.6f1
- Firebase Unity SDK version: 6.16.0
- Source you installed the SDK: Unity Package Manager (.unitypackage or Unity Package Manager)
- Problematic Firebase Component: Database (Auth, Database, etc.)
- Other Firebase Components in use: Database (Auth, Database, etc.)
- Additional SDKs you are using: none (Facebook, AdMob, etc.)
- Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)
- Platform you are targeting: Android (iOS, Android, and/or desktop)
- Scripting Runtime: Mono (Mono, and/or IL2CPP)
[REQUIRED] Please describe the issue here:
When building a Firebase project (in this case, the Database test app) with a mainTemplate.gradle, I get the following issue:
> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
It will go away if I also generate a gradleTemplate.properties file with android.useAndroidX=true in it or if I delete the mainTemplate.gradle file.
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Steps to reproduce:
- Check out one of the test apps (I used the Database one).
- Add a mainTemplate.gradle file

Restart Unity (you may get a resolution failed error if you don't perform this step) - Click "Build And Run" for Android
Workaround (if you need a mainTemplate.gradle file, it works fine without one):
- Also generate a
gradleTemplate.propertiesfile:

- Add
android.useAndroidX=trueto the end of it. Note that just generating this file is not enough, but it must be modified as well.
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
What's the issue repro rate? 100%
If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
Relevant Code:
// TODO(you): code here to reproduce the problem
