[JAVA] [Android Studio] What to try when you get into error spitting hell

Introduction

I've tried various things, but I would like people who end up throwing errors to try it. When I was developing an app in Android Studio before, I noticed that I shouldn't normally spit out ErrorLog, but it accumulates more and more at regular intervals. I investigated based on ErrorLog to investigate the cause in detail, and tried various things, but in the end it was not solved, ... At that time, I noticed the description that "cache may be bad", and it is strange to try it. It was a one-shot solution! !! !! If you notice it, it's a moment. If I didn't notice it, I would have been stuck in the swamp for the rest of my life, so I definitely have to share this with the app developers! I thought it was an article. I hope it helps someone ...

Things to do

  1. Select [Invalidate caches / Restart] from the [File] tab of Android Studio. menu

  2. Select [invalidate & Restart] in the dialog Dialog

  3. After rebooting, check if the error hell in question has recurred

(If you still can't solve it with 3, please try 4.5 below.)

  1. Select [invalidate] in the previous dialog
  2. Delete the entire .gradle / folder directly under the project
  3. Open Android Studio again

What do you think? I was able to solve it. Since the .gradle / folder is the folder that stores the cache that is temporarily created at Build, there is no problem because it will be created automatically at Build even if you delete it.

Recommended Posts

[Android Studio] What to try when you get into error spitting hell
What to do if you get an error when you hit Heroku logs
What to do if you get an "A server is already running." Error when you try to start the rails server
What to do if you get a port error when docker-compose up on Mac
What to do if you get a "Cannot Pull Container Error" when starting ECS ​​Fargate
I get a Ruby version error when I try to start Rails.
What to do if you get a DISPLAY error in gym.render ()
What to do when you run into a docker-compose node_modules problem
What to do if you get a JNI shared library error when trying to build in Eclipse
What to do if you get an error during rails db: reset
What to do if you get an uninitialized constant Likes Controller error
What to do if you get Application with name appName is already registered. When you try to start GlassFish
What to do if you get a SQLite3 :: BusyException: database is locked error
What to do if you get the error message unrecognized selector send to instance "***"
What to do if you get an error on heroku rake db: migrate
When I try to run docker-compose, I get the error "Cannot locate specified Dockerfile: Dockerfile"
What do you use when converting to String?
What to do if you get an error saying "Please enter a valid value" when getting with Rails datetime_field
What to do if you get an error saying "Could not find a JavaScript runtime." When starting rails server
What to do if you get a wrong number of arguments error in binding.pry
What to do if you get a NoClassDefFoundError when trying to run eclipse on Java9
What to do if you get the error Couldn't find Item without an ID
[Android studio / Java] What you don't understand when you touch it for the first time
What to do when a null byte error occurs
Error ExecJS :: RuntimeUnavailable: What to do when it occurs
A memo to check when you try to use Lombok
I found no way to get the error code when I received an exception on Android
[Rails] What to do if you can't get an error message with the errors method
When you want to implement Java library testing in Spock with multi-module in Gradle in Android Studio 3
What to do if you get a "302" error in your controller unit test code in Rails
What to do if you get an error in Basic authentication during Rails test code
What to do when you launch an application with rails
What to do if you get a "Mysql2 :: Error: Operand should contain 1 column (s)" error in Rails
What to do if you get an [An HTTP request took too long to complete.] Error in Docker.
What to do if you get "Changes not staged for commit:" when you git status after git add.
What to do if you get angry with OpenSSL with pyenv install
What to do when you become a Problem During Content Assist
[Rails] What to do if you can't get parameters with form_with
What to do if you get an error with bundle install by entering gem'bcrypt' in your Gemfile
What to do if you get the error Too long with no output (exceeded 10m0s) on CircleCI
[Rails] What to do if you get an error saying "Could not find a JavaScript runtime." When executing the rails s command on Catalina