简体   繁体   English

您好,亲爱的,我将我的应用程序附加到 firbase adabase,所以它崩溃了。 我已经尝试了太多来解决这个问题,但无法摆脱请帮助我

[英]Hello Dear, I attach my app with firbase adabase so it crashes. I have tried too much to sort out of this Problem but can't get rid of please help me

I have problem of crashing app whenever open this script每当打开此脚本时,我都会遇到应用程序崩溃的问题

Well, looks like a classic problem of variable not initialized.好吧,看起来像是一个变量未初始化的经典问题。

In the stacktrace (the text reported back to you with the reason of the error) you got a NullPointerException this means you have a place in your code with a variable pointing to nothing (aka null ).在堆栈跟踪(向您报告错误原因的文本)中,您得到了NullPointerException这意味着您的代码中有一个变量指向任何内容(又名null )。

Usually when you define a variable in java like this:通常当您在 java 中定义一个变量时,如下所示:

String myVariable;

You are not assigning any value, which means the variable has null information.您没有分配任何值,这意味着该变量具有null信息。 Then you cannot call methods or do anything with that variable.然后你不能调用方法或对该变量做任何事情。

Currently, for the screenshot you shared, that's your problem.目前,对于您共享的屏幕截图,这是您的问题。 My guess is that around line 271 when you try to access Pinb.length() your variable does not contain any value.我的猜测是,当您尝试访问Pinb.length()时,在第271行附近,您的变量不包含任何值。

So your problem is more about what you are trying to access and not a Firebase problem.因此,您的问题更多是关于您要访问的内容,而不是 Firebase 问题。 Check your code and check that it actually assigns a value to your variables before accessing them.检查您的代码并在访问它们之前检查它是否确实为您的变量分配了一个值。 You can even check for a null and see that your code will compile:您甚至可以检查 null 并查看您的代码是否可以编译:

if(Pinb.= null && Pinb.legnth() < 6) { //your code here... }

Also check your if as usually if statements does not end with ;还要检查您的if通常if语句不以;结尾because that means something like: hey check this expression and do nothing .因为这意味着类似:嘿检查这个表达式并且什么都不做

Check the billing plan.检查计费计划。

or:或者:

  1. Sign into Firebase, then open your project.登录 Firebase,然后打开您的项目。
  2. Click the Settings icon, then select Project settings.单击设置图标,然后单击 select 项目设置。
  3. In the Your apps card, add an app:在您的应用卡片中,添加一个应用:

If you have no apps in your project: Click the icon for the app's platform, then follow the setup workflow.如果您的项目中没有应用程序:单击应用程序平台的图标,然后按照设置工作流程进行操作。

If you already have apps in your project: Click Add app, then follow the setup workflow.如果您的项目中已有应用程序:单击添加应用程序,然后按照设置工作流程进行操作。 Note that you can also add an app to your project from the console's main overview page of your Firebase project.请注意,您还可以从 Firebase 项目的控制台主概览页面将应用程序添加到您的项目中。

https://youtu.be/iosNuIdQoy8 https://youtu.be/iosNuIdQoy8

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我得到错误:可靠的精度损失,我试图改变它,但我可以解决它,请帮助我 - I get the error: posible loss of of precision and i have tried to change it but I can fix it, please help me 我尝试了 Leetcode-724 (Pivot index) 问题,请帮我纠正我的方法 - I tried the problem Leetcode-724 (Pivot index), Please help me correct my approach 代码没有显示这本书。 我尽了最大的努力,但没有成功,请帮助我 - The code isn't showing the book. I tried my best but never succeeded, please help me with it 我想在我的应用程序上进行 m3u8 直播。 那么任何人都可以帮助我如何做到这一点? 我尝试使用 exoplayer 但我失败了 - i want to do m3u8 live streaming on my app. So can anyone help me how can i do this ? i tried with exoplayer but i failed 我手机中的这个应用商店笔记在它第一次运行时运行它,然后我单击添加按钮并且应用程序崩溃。 从手机加载应用程序数据的问题 - This App store notes in my phone run it very first time it runs then I click the add button and app crashes. Problem in loading data in app from phone 我尝试编写 n 个皇后问题,我是初学者,我认为主要逻辑是正确的,但我没有按要求得到 output。有人可以帮我吗? - I tried to code n queens problem, I'm a beginer and I think that main logic is right but I am not getting output as required.can someone help me out? 我的图书馆管理项目中出现SQl插入错误。 我试图弄清楚自己但失败了很多次。 - I have a SQl Insertion Error In My Library Mangement Project. I tried to Figure out myself but failedd many times.Help me out 缺少构造函数。 游戏崩溃。 当我尝试打开它时,尝试了所有构造函数和游戏仍然崩溃 - Missing constructor. Game crashes. Tried all constructors and game still crashes when I try to open it 请帮助我解决这个JAVA中的异常 - Please help me sort out this Exception In JAVA 我不知道为什么我的程序给我花括号错误。 我怎样才能解决这个问题 ? 请帮忙 - I don't know why my program is giving me curly brace errors. How can I fix this ? Please help
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM