Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[question] firebase-core function initializeAppWithPath(path) for Android

未關閉
#79 8 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
android, angular, ios, typescript
領域
mobile-dev

研究方向

首先追蹤 initializeAppWithPath(path) 進入點,以及 Android 如何解析 google-services.json,然後將該行為與正常運作的 iOS res:// 路徑進行比較。檢查是否能從專案中判定 Android 路徑範例;完成標準是提供經驗證的 Android 路徑指引,或找出可重現的載入修正方案。

由索引模型根據 Issue 內容生成。

描述

android bug

Hello,

I am trying to load a different firebase configuration per environment. I figured that using the initializeAppWithPath() I could point to the Google Services config files for dev and prod for Android and iOS.

For iOS It worked out of the box using the path res://, it points to the App_Resource/iOS folder.

However, for android I do not seem to be able to load the google-services.json at all.

I tried with path res://, ~/ and resolving the path myself and I always get the error firebase.init error: Error: com.tns.NativeScriptException: Failed to find module: "/data/data/com.nativescript/files/app/firebase/dev/google-services.json", relative to: app/

Would you guys be so kind and provide some examples for Android on to which folder the paths res://, ~/ point in the code base?

I am using Angular flavor.

Best

主要語言
TypeScript
星號
62
分支
53
平均合併
8 天 4 小時
30 天內合併 PR
2

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

NativeScript/firebase 的其他 Issue

查看 NativeScript/firebase 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。