Useful or not, from you.
react-native-firebase cannot find symbol BuildConfig.APPLICATION_ID

<!--- Hello there you awesome person; Please note that the issue list of this repo is exclusively for bug reports;

  1. For feature requests please visit our Feature Request Board.
  2. For questions and support please use our Discord chat: https://discord.gg/C9aK28N or Stack Overflow: https://stackoverflow.com/questions/tagged/react-native-firebase
  3. If this is a setup issue then please make sure you've correctly followed the setup guides, most setup issues such as 'duplicate dex files', 'default app has not been initialized' etc are all down to an incorrect setup as the guides haven't been correctly followed. -->

<!-- NOTE: You can change any of the [ ] to [x] to mark an option(s) as selected -->

<!-- PLEASE DO NOT REMOVE ANY SECTIONS FROM THIS ISSUE TEMPLATE --> <!-- Leave them as they are even if they're irrelevant to your issue -->

Issue

<!-- Please describe your issue here --^ and provide as much detail as you can. --> <!-- Include code snippets that show your usages of the library in the context of your project. --> <!-- Snippets that also show how and where the library is imported in JS are useful to debug issues relating to importing or methods not found issues -->

Describe your issue here

node_modules@react-native-firebase\app\android\src\reactnative\java\io\invertase\firebase\app\ReactNativeFirebaseAppInitProvider.java:25: error: cannot find symbol
    BuildConfig.APPLICATION_ID + ".reactnativefirebaseappinitprovider";
               ^
  symbol:   variable APPLICATION_ID
  location: class BuildConfig
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':@react-native-firebase_app:compileDebugJavaWithJavac'.

Project Files

<!-- Provide the contents of key project files which will help to debug --> <!-- For Example: --> <!-- - iOS: Podfile contents. --> <!-- - Android: android/build.gradle contents. --> <!-- - Android: android/app/build.gradle contents. --> <!-- - Android: AndroidManifest.xml contents. -->

<!-- ADD THE CONTENTS OF THE FILES IN THE PROVIDED CODE BLOCKS BELOW -->

Javascript

<details><summary>Click To Expand</summary> <p>

package.json:

# N/A
{
  "name": "appname_mobile",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "postinstall": "npx rn-nodeify --install \"fs, util, path, tls, stream,buffer,global,process\" --hack  \"node ./android-release-gradle-fix.js\"",
    "build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'"
  },
  "dependencies": {
    "@react-native-community/async-storage": "1.7.1",
    "@react-native-firebase/analytics": "^6.3.4",
    "@react-native-firebase/app": "^6.3.4",
    "@react-native-firebase/crashlytics": "^6.3.4",
    "asyncstorage-down": "^4.2.0",
    "aws-iot-device-sdk": "^2.2.1",
    "aws-sdk": "^2.601.0",
    "axios": "0.19.0",
    "buffer": "^4.9.1",
    "events": "^3.1.0",
    "native-base": "^2.13.8",
    "path-browserify": "0.0.0",
    "process": "^0.11.10",
    "react": "16.9.0",
    "react-native": "0.61.5",
    "react-native-appearance": "0.3.1",
    "react-native-check-box": "^2.1.7",
    "react-native-config": "^0.12.0",
    "react-native-confirmation-code-input": "1.0.4",
    "react-native-dashed-progress": "^1.0.1",
    "react-native-fs": "^2.16.6",
    "react-native-gesture-handler": "^1.5.2",
    "react-native-level-fs": "^3.0.1",
    "react-native-localization": "2.1.6",
    "react-native-logs": "^2.0.0",
    "react-native-modal": "^11.5.3",
    "react-native-paper": "^3.5.1",
    "react-native-reanimated": "^1.4.0",
    "react-native-slider": "^0.11.0",
    "react-native-splash-screen": "^3.2.0",
    "react-native-tab-view": "^2.11.0",
    "react-native-uuid": "^1.4.9",
    "react-native-vector-icons": "^6.6.0",
    "react-navigation": "4.0.10",
    "react-navigation-stack": "1.10.3",
    "react-navigation-tabs": "2.6.2",
    "react-redux": "^7.1.3",
    "readable-stream": "^1.0.33",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0",
    "reselect": "^4.0.0",
    "rn-nodeify": "^10.2.0",
    "stream-browserify": "^1.0.0",
    "util": "^0.10.4"
  },
  "devDependencies": {
    "@babel/core": "^7.7.4",
    "@babel/runtime": "^7.7.4",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.9.0",
    "eslint": "^6.7.2",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.57.0",
    "react-test-renderer": "16.9.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "react-native": {
    "path": "path-browserify",
    "fs": "react-native-level-fs",
    "_stream_transform": "readable-stream/transform",
    "_stream_readable": "readable-stream/readable",
    "_stream_writable": "readable-stream/writable",
    "_stream_duplex": "readable-stream/duplex",
    "_stream_passthrough": "readable-stream/passthrough",
    "stream": "stream-browserify",
    "tls": false
  },
  "browser": {
    "path": "path-browserify",
    "fs": "react-native-level-fs",
    "_stream_transform": "readable-stream/transform",
    "_stream_readable": "readable-stream/readable",
    "_stream_writable": "readable-stream/writable",
    "_stream_duplex": "readable-stream/duplex",
    "_stream_passthrough": "readable-stream/passthrough",
    "stream": "stream-browserify",
    "tls": false
  }
}

firebase.json for react-native-firebase v6:

# N/A

iOS

<details><summary>Click To Expand</summary> <p>

ios/Podfile:

  • [ ] I'm not using Pods
  • [x] I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A

</p> </details>


Android

<details><summary>Click To Expand</summary> <p>

Have you converted to AndroidX?

<!--- Mark any options that apply below -->

  • [x ] my application is an AndroidX application?
  • [x ] I am using android/gradle.settings jetifier=true for Android compatibility?
  • [ ] I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

apply plugin: "com.android.application"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
.
.
.
dependencies {
    implementation project(':react-native-splash-screen')
    implementation project(path: ":@react-native-firebase_app")
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation 'com.google.firebase:firebase-analytics:17.2.2'
    implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01'


    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

android/app/build.gradle:

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.0-alpha09'
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta02'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->

</p> </details>


Environment

<details><summary>Click To Expand</summary> <p>

react-native info output:

<!-- Please run react-native info on your terminal and paste the contents into the code block below -->

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
D:\<path to project>\node_modules\@react-native-firebase\app\android\src\reactnative\java\io\invertase\firebase\app\ReactNativeFirebaseAppInitProvider.java:25: error: cannot find symbol
    BuildConfig.APPLICATION_ID + ".reactnativefirebaseappinitprovider";
               ^
  symbol:   variable APPLICATION_ID
  location: class BuildConfig
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':@react-native-firebase_app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

<!-- change [ ] to [x] to select an option(s) -->

  • Platform that you're experiencing the issue on:
    • [ ] iOS
    • [x] Android
    • [ ] iOS but have not tested behavior on Android
    • [ ] Android but have not tested behavior on iOS
    • [ ] Both
  • react-native-firebase version you're using that has this issue:
    • 6.3.4
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID
  • Are you using TypeScript?
    • N & VERSION

</p> </details>

<!-- Thanks for reading this far down ❤️ --> <!-- High quality, detailed issues are much easier to triage for maintainers -->

<!-- For bonus points, if you put a 🔥 (:fire:) emojii at the start of the issue title we'll know --> <!-- that you took the time to fill this out correctly, or, at least read this far -->


Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]

That's a useful answer
Without any help

Downgraded build tools, gradle wrapper :

  1. Build tools version \android\build.gradle
	dependencies {
		classpath("com.android.tools.build:gradle:3.4.2")
		....
	}
  1. Gradle wrapper \android\gradle\wrapper\gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip