I encountered this google service missing error when I try to run the app Kickstarter from GitHub in Android Studio.
Tried to look for answers and I found that I am supposed to run "make bootstrap" but I really can't quite understand how you do it (I'm still a novice in coding/android/github in general).
Here is the error:
File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\min21\debug\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\externalMin21\debug\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\debug\externalMin21\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\debug\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\min21\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\min21Debug\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\externalMin21\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\debug\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\externalMin21Debug\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\externalDebug\google-services.json
C:\Users\naufa\AndroidStudioProjects\android-oss\app\google-services.json
The scenario was:
I imported the project into Android Studio, when I try to run the app, the error above pops up. I browsed for solutions and found out that I need to run "make bootstrap" in some sort of terminal/CMD, but I have zero ideas on how to do that. I don't even know what a bootstrap is.
There was a lot of different answers that I have no idea how to do since the answers was meant for non-beginners. I'm so confused, some help would be greatly appreciated.
I'm running Windows 11 64-bit, if there is any other info I should provide please do tell me. Here's the Clone link if anyone would like to open it in Android Studio: https://github.com/kickstarter/android-oss.git
I know someone had the same problem but I just can't understand that answer/solution so it would be really helpful if someone can explain in easy words.
CodePudding user response:
Bootstrap is a set of initial files required to build the project. Since you miss the "bootstrap" you get the error.
make bootstrap
refers to a command that will build the needed files for you.
GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.
and bootstrap
is a step in the project's Makefile that controls building the files for you. make bootstrap
command basically asks the make
software to run the bootstrap
step from the Makefile.
From the issue thread it seems you can't do it directly from Windows. You need WSL which is just linux bash for windows.
Once you install WSL, install make and ruby. Run these commands one by one:
sudo apt update
sudo apt install ruby-full make
This should add ruby
and make
.
Then clone the kickstart project again (through WSL this time). cd
into it (again through WSL) and run make bootstrap
.
It will take a moment, once the bootstraps are built you can proceed to run AndroidStudio as usual.
That's what the issue thread on GitHub explains. I hope this made it simpler for you!