Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]

iam struck while i tried to cordova build android. i just added ‘cordova-plugin-fcm’ plugin in ionic-v1 and followed the docs steps. but after that i cant solve this build issue. i dont know what iam missing!

  • added google.services.json in “platform/android/google.services.json”
  • tried with rootfolder too (www/google.services.json)
  • added in config.xml file too
    <resource-file src="google-services.json" target="google-services.json" />

issue:

What are the docs steps you followed?

(Your title is wrong by the way, the error message in your screenshot says something different)

i followed this docs to add fcm sdk to add fcm sdk

  1. created a project in the firebase console
  2. entered the package name and downloaded the “google.services.json” file and placed in the root folder (ionic/application/www/ ‘placed’)
  3. added sdk
    a. First, add rules to your root-level build.gradle file, to include the google-services plugin and the Google’s Maven repository:
buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.2.0' // google-services plugin
    }
}

allprojects {
    // ...
    repositories {
        // ...
        maven {
            url "https://maven.google.com" // Google's Maven repository
        }
    }
}

b. add the apply plugin line at the bottom of the file to enable the Gradle plugin:

apply plugin: 'com.android.application'

android {
  // ...
}

dependencies {
  // ...
  compile 'com.google.firebase:firebase-core:12.0.1'
  
  // Getting a "Could not find" error? Make sure you have
  // added the Google maven respository to your root build.gradle
}

// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
  1. added cordova-plugin-fcm.
  2. then tried to build an apk

and @Sujan12 sorry, i have changed the title.

Having the same issue! Did you manage to solve it?

No! sorry for late response @hanigb i just removed all this codes & fcm plugin and made use of lower level versions to finish it off my app first. Based on my requirements, its not a must do list so leaved this part.

also i moved on to the current ionic framework where lots of features,docs and tutorials are available.