使用 flutter 应用程序设置 firebase 进行身份验证

问题描述 投票:0回答:1
Microsoft Windows [Version 10.0.22631.3593]
(c) Microsoft Corporation. All rights reserved.

E:\flutter self practice\filesharewithfirebase>flutterfire configure --project=filesharewithfirebaase
i Found 11 Firebase projects. Selecting project filesharewithfirebaase.
✔ Which platforms should your configuration support (use arrow keys & space to select)? · android, ios, macos, web, windows
✔ Which Android application id (or package name) do you want to use for this configuration, e.g. 'com.example.app'? ·
i Firebase android app  is not registered on Firebase project filesharewithfirebaase.
⠇ Registering new Firebase android app on Firebase project filesharewithfirebaase.
FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command.
COMMAND: firebase apps:create android filesharewithfirebase (android) --package-name= --json --project=filesharewithfirebaase        
ERROR: Package name for Android app cannot be empty

E:\flutter self practice\filesharewithfirebase>






i Firebase android app  is not registered on Firebase project filesharewithfirebaase.
i Firebase android app  is not registered on Firebase project filesharewithfirebaase.
i Firebase android app  is not registered on Firebase project filesharewithfirebaase.
⠇ Registering new Firebase android app on Firebase project filesharewithfirebaase.
FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command.
COMMAND: firebase apps:create android filesharewithfirebase (android) --package-name= --json --project=filesharewithfirebaase        
ERROR: Package name for Android app cannot be empty
✔ Which Android application id (or package name) do you want to use for this configuration, e.g. 'com.example.app'? · com.example.filesharewithfirebasecom.example.filesharewithfirebase erfire configure
i Firebase android app com.example.filesharewithfirebasecom.example.filesharewithfirebase is not registered on Firebase project college-c0823.a Firebase project to configure your Flutter application with · college-c0823 (college)
i Registered a new Firebase android app on Firebase project college-c0823.
i Firebase ios app com.example.filesharewithfirebase is not registered on Firebase project college-c0823.
i Registered a new Firebase ios app on Firebase project college-c0823.
i Firebase macos app com.example.filesharewithfirebase registered.
Failed to parse JSON response from Firebase CLI. JSON response: {
  "status": "success",
  "result": {
    "fileName": "GoogleService-Info.plist",
    "fileContents": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>API_KEY</key>\n\t<string>AIzaSyA1pfZ5mtQXxChISwdgVJjUJZ-2Jsy0vHk</string>\n\t<key>GCM_SENDER_ID</key>\n\t<string>287444333228</string>\n\t<key>PLIST_VERSION</key>\n\t<string>1</string>\n\t<key>BUNDLE_ID</key>\n\t<string>com.example.filesharewithfirebase</string>\n\t<key>PROJECT_ID</key>\n\t<string>college-c0823</string>\n\t<key>STORAGE_BUCKET</key>\n\t<string>college-c0823.appspot.com</string>\n\t<key>IS_ADS_ENABLED</key>\n\t<false></false>\n\t<key>IS_ANALYTICS_ENABLED</key>\n\t<false></false>\n\t<key>IS_APPINVITE_ENABLED</key>\n\t<true></true>\n\t<key>IS_GCM_ENABLED</key>\n\t<true></true>\n\t<key>IS_SIGNIN_ENABLED</key>\n\t<true></true>\n\t<key>GOOGLE_APP_ID</key>\n\t<string>1:287444333228:ios:97573a0ab69af270b9a509</string>\n</dict>\n</plist>"
  }
}{
  "status": "error",
  "error": "Timed out."
}
FormatException: Unexpected character (at line 7, character 2)
}{
 ^


E:\flutter self practice\filesharewithfirebase>

在应用程序中连接时出错

flutter firebase
1个回答
0
投票

您的 Android 应用程序未在 firebase 上注册。

首先转到firebase,然后打开您创建的项目,之后您将看到这个enter image description here

在添加应用程序上为您的项目添加 android

© www.soinside.com 2019 - 2024. All rights reserved.