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


#1

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:


#2

What are the docs steps you followed?

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


#3

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.