Home > other >  Hello Dear, I attach my app with firbase adabase so it crashes. I have tried too much to sort out of
Hello Dear, I attach my app with firbase adabase so it crashes. I have tried too much to sort out of

Time:01-04

I have problem of crashing app whenever open this script

CodePudding user response:

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 (a.k.a. null).

Usually when you define a variable in java like this:

String myVariable;

You are not assigning any value, which means the variable has null information. 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.

So your problem is more about what you are trying to access and not a Firebase problem. 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:

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

Also check your if as usually if statements does not end with ; because that means something like: hey check this expression and do nothing.

CodePudding user response:

Check the billing plan.

or:

  1. Sign into Firebase, then open your project.
  2. Click the Settings icon, then select Project settings.
  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.

https://youtu.be/iosNuIdQoy8

  •  Tags:  
  • Related