Unresolved reference to firebaseCrashlytics Gradle extension since 2.6.0 [firebase-crashlytics-gradle]
See original GitHub issue[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:
- For general technical questions, post a question on StackOverflow with the firebase tag.
- For general Firebase discussion, use the firebase-talk google group.
- For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Android Studio version: 4.2 (Latest Stable channel)
- Firebase Component: Firebase Crashlytics Gradle plugin
- Component version: 2.6.0+ (started in 2.6.0, still happens in latest 2.6.1)
[REQUIRED] Step 3: Describe the problem
The Gradle configuration to use the ‘firebaseCrashlytics’ Gradle extension, in order to set configuration properties such as ‘mappingFileUploadEnabled’, can no longer be resolved. This is using an unchanged set up that worked in previous version and is the same as what is in the Firebase Android documentation.
Steps to reproduce:
- Add configuration to app module Gradle configuration to use the ‘firebaseCrashlytics’ Gradle extension and set any property, such as ‘mappingFileUploadEnabled’.
- When you configure the project you get Unresolved errors relating to the extension.
e: /src/app/build.gradle.kts:146:13: Unresolved reference: firebaseCrashlytics
e: /src/app/build.gradle.kts:147:17: Unresolved reference: mappingFileUploadEnabled
e: /src/app/build.gradle.kts:164:13: Unresolved reference: firebaseCrashlytics
e: /src/app/build.gradle.kts:165:17: Unresolved reference: mappingFileUploadEnabled
If you rollback to the previous version, 2.5.2, everything works again.
Relevant Code:
In the app module build.gradle.kts
:
buildTypes {
getByName("debug") {
...
firebaseCrashlytics {
mappingFileUploadEnabled = false
}
}
...
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Unable to sync Gradle with Firebase Crashlytic 2.6.0 using ...
UPDATED ANSWER: The reason for the compiling issue is that version of Gradle and Crashlytics Gradle plug-in is incompatible.
Read more >Get started with Firebase Crashlytics - Google
This quickstart describes how to set up Firebase Crashlytics in your app with the Firebase ... Step 2: Add the Crashlytics Gradle plugin...
Read more >Editor shows "unresolved reference" in Kotlin code [130138336]
For a project that has a buildSrc/ project using Android Gradle Plugin and then uses values from buildSrc in regular project build.gradle files,...
Read more >PSA: Disabling mapping file uploads with Crashlytics
Unresolved reference error. The correct syntax for Kotlin Gradle DSL is ... import com.google.firebase.crashlytics.buildtools.gradle.
Read more >Release Notes - Play services - Google Developers
Firebase Android BoM (Bill of Materials); Cloud Firestore; Firebase App Check; Firebase App Distribution; Firebase Crashlytics Gradle plugin ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing the issue, as the it has been resolved with guidance of what we should be doing. It sounds like the issue of updating Kotlin DSL documentation is also “in hand”.
@lordcodes @kmayoral In addition to the
withGroovyBuilder
workaround, I believe use of the Kotlin DSLs ExtensionAware.the() functions will work:This is a little less attractive as it exposes the
CrashlyticsExtension
class in your build script rather than allowing you to use thefirebaseCrashlytics
block, but it gives better type safety than thewithGroovyBuilder
workaround. Thoughts on this?Just be advised that technically
CrashlyticsExtension
isn’t part of our public API. However, if we break this syntax it will be while adding improved Kotlin support so we’ll be sure to publish official docs describing the preferred approach.Finally, can either of you confirm that using the
firebaseCrashlytics.mappingFileUploadEnabled = false
syntax actually worked as expected in a Kotlin build script? In my test apps using 2.5.2, my builds succeed but the value isn’t respected.