Ionic cordova build error of google firebase

  • What went wrong:
    A problem was found with the configuration of task ‘:app:injectCrashlyticsMappingFileIdDebug’ (type ‘InjectMappingFileIdTask’).
    • In plugin ‘com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin’ type ‘com.google.firebase.crashlytics.buildtools.gradle.tasks.InjectMappingFileI
      dTask’ field ‘resourceFile’ without corresponding getter has been annotated with @OutputFile.

      Reason: Annotations on fields are only used if there’s a corresponding getter for the field.

      Possible solutions:

      1. Add a getter for field ‘resourceFile’.
      2. Remove the annotations on ‘resourceFile’.

      Please refer to Dealing with validation problems for more details about this problem.

Same problem. After upgrade from Ionic 5 to 6