104 words
1 minute
Fixing the AndroidX Build Error After Adding Firebase to Unity
After importing Firebase into Unity, I encountered the following build error:
Could not determine the dependencies of task ':launcher:lintVitalRelease'.> 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. The following AndroidX dependencies are detected: androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0,The project depended on AndroidX, but android.useAndroidX had not been enabled.
Enable the Gradle properties template
Under Build Settings → Player → Publishing Settings, enable Custom Gradle Properties Template. Unity generates the template at Assets/Plugins/Android/gradleTemplate.properties.
Add these two lines:
android.useAndroidX=trueandroid.enableJetifier=trueMy resulting properties file looked like this:
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**Morg.gradle.parallel=trueandroid.enableR8=**MINIFY_WITH_R_EIGHT**unityStreamingAssets=**STREAMING_ASSETS**android.useAndroidX=trueandroid.enableJetifier=true**ADDITIONAL_PROPERTIES**That resolved the problem in this project.
Fixing the AndroidX Build Error After Adding Firebase to Unity
https://blog.coding1024.com/en/posts/3a0ce390/
Comments
Questions, ideas and experiences are welcome. Please be kind and avoid sharing private information.
Loading comments…