文件"firebase.json"在 React-Native-Firebase V6 中的位置


React Native Firebase V6文档没有指定在哪里创建文件firebase.json

"dependencies": {
"@react-native-firebase/admob": "^0.4.1",
"@react-native-firebase/app": "^0.1.2",
"@react-native-firebase/auth": "^0.1.2",
"@react-native-firebase/firestore": "^0.1.2",
"matter-js": "^0.14.2",
"react": "16.8.6",
"react-native": "0.60.3",
"react-native-elements": "^1.1.0",
"react-native-game-engine": "^0.11.5",
"react-native-gesture-handler": "^1.3.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-progress": "^3.6.0",
"react-native-radial-gradient": "^1.0.5",
"react-native-share": "^2.0.0",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^3.11.1"
},

控制台中出现以下错误:

  • 其中:

    • 构建文件"D:\Jesus\IFEEP AT\StoreClicker\StoreSkinClicker"\node_modules@react-native-firebase\admob\android\build.gradle'行:44

  • 哪里出了问题:

    • 评估项目":@react-native-firebase_amob"时出现问题。方法的无签名:java.util.LinkedHashMap.getStringValue()适用于参数类型:(String,String)值:[admob_app_id,]

firebase.json需要进入react本机项目的根目录。与package.json级别相同。

如果你为ios运行pod安装,它会输出一行:

Using firebase.json from '<Path_To_Project>/firebase.json'

我认为这是正确的立场。。。

这就是你的firebase.json的样子:

{
"react-native": {
"ml_vision_face_model": true,
"ml_vision_ocr_model": true,
"ml_vision_barcode_model": true,
"ml_vision_label_model": true,
"ml_vision_image_label_model": true
}
}

.JSON文件通常保存在react本机项目的根目录下的本机文件夹中,在android中,我们将其保存在app文件夹中,并尝试为其提供相对路径。

最新更新