使用复杂的样式树更改google-services.json的搜索位置 [英] Changing the Searched Location for google-services.json using complex flavour tree
问题描述
我知道已经有人问过这个问题,但对于4.2.0以上的com.google.gms:google-services的任何版本,问题仍然存在:我的google-services.json文件的搜索位置不再考虑风味树突.
I know this has been asked already, but the problem persists for any version of com.google.gms:google-services above 4.2.0: the searched location for my google-services.json file is no longer taking the flavour arborescence into consideration.
它只会显示:
文件google-services.json丢失.没有它,Google Services插件将无法运行.
File google-services.json is missing. The Google Services Plugin cannot function without it.
搜索的位置:〜/app/google-services.json
Searched Location: ~/app/google-services.json
代替〜/app/src/TopflavorSubflavor/release/google-services.json
我已经尝试了release文件夹和flavor文件夹之间的多个排列,甚至包括Flare名称中的Release,但没有任何帮助.
I have tried multiple permutations between the release folder and the flavor folder, even including Release in the flavor name, but nothing helps.
官方文档指出它应该可以工作,这就是为什么我要寻找的不仅仅是解决方法,例如在构建时在/app/文件夹中创建文件.
The official docs states it should work and that's why I am looking for something more than a workaround like creating the file in the /app/ folder at build time.
推荐答案
尝试使用下划线小写或一词小写的名称来命名您的口味:
Try to name your flavors with underscore lowercase or one-word lowercase names :
top_flavor
subflavor
这篇关于使用复杂的样式树更改google-services.json的搜索位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!