Answer the question
In order to leave comments, you need to log in
How to find the place in the code where the error occurred?
When I click on the button, the activity crashes and errors appear in the logcat:
2022-04-09 17:25:44.566 21747-21747/? E/u.homebuy.neit: Unknown bits set in runtime_flags: 0x8000
2022-04-09 17:25:45.262 21747-21786/ru.homebuy.neit E/Perf: Fail to get file list ru.homebuy.neito
2022-04-09 17:25:45.262 21747-21786/ru.homebuy.neit E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
Answer the question
In order to leave comments, you need to log in
1) Open Logcat in Android Studio
2) run the program
3) perform actions in the program leading to an error
Load the code into some IDE, for example, Android Studio, run it in debug mode, raise an error, and look at the description of the error in the debugger console.
Judging by what you wrote, the program was written by a crooked programmer who wrote the code in such a way that he tries to get the size of an array without first making sure that it exists and that it is not zero.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question