Search code examples
javaandroidandroid-studioxiaomi

Android Studio not showing build error in Xiaomi phone


My application restarts when I have errors in my code, the problem is that I cannot know in which line of code the error is because Android Studio does not tell me. I have this problem on a Xiaomi mi 11i phone (Android 11, MIUI 12.5.3) I can only see blue text.

enter image description here

I have a Samsung J260 device in which I have no problems (when there are problems in my code it always tells me which line it is on), I don't like to do tests on my Samsung because it takes too long. What could be the problem?


Solution

  • You should switch off the MIUI Optimization option from Developer Options.

    Also check if USB debugging is switched on.