How to restart app in android studio emulator without recovering status?

Asked

Viewed 781 times

-2

I created a login screen and implemented the authentication. If there is logged in user, the main screen is shown, if not, the login screen is displayed. After I logged in to test the Android Studio saved the status in the emulator, so it no longer goes to the login screen. What to do to reset it? Any ideas?

  • I tried "Cold start", but it didn’t solve!

  • 1

    android-studio is a development software, the emulator is the part, if this locked on the login screen is because it did something to look like this, so it seems problem in your application and not in android-studio.

  • 1

    Guilherme, it’s not the app’s problem. It’s not locking on the login screen. The flow is as follows: when starting the app, the App Application (firebase) is made, if there is no logged-in user, the login screen is shown. If the user is logged in, the login screen is not shown, but the main screen. When I logged the first time to test everything went well, soon after I closed the emulator and saw a message saying the state would be saved. That is, as the status "logged in" was saved, every time I compile, it goes straight to main.

  • 1

    But for me this seems like the app, as far as I understand the business rule of the app has to be defined, knowing where to start and checking whether it is recovering or not, but without details it is difficult to know what happened.

  • 1

    Dude, you were actually right! I’m just taking a few classes and the teacher just didn’t explain that part. In the class comments there were several people with the same problem as me. I decided using mAuth.signOut() until the part of implementing the logout arrives! Thanks to your comments I managed to find a solution.

1 answer

3


Open the VMD ( Virtual Device Manager ) and select Cold Boot Now in the Actions column of your device.

inserir a descrição da imagem aqui

In the thermial can do so:

$ emulator -avd Nome_Do_Dispositivo -no-snapshot-load -no-snapshot

Remove the folder .idea of your application folder should also solve.

  • With Cold Boot not solved, I will try to remove the folder . idea to see!

  • Try with terminal commands

Browser other questions tagged

You are not signed in. Login or sign up in order to post.