Log.d not showing log.d in Logcat Android Studio
After hours of searching and trying, I found out it did not have to do with Android Studio, but that my phone didn't allow Logging. See this answer for more information.
Alternatively, you could use System.out.println()
to show the text in logcat
Replace
Log.d("Oncreatetestlog", "onCreate() Restoring previous state");
With
System.out.println("Oncreatetestlog onCreate() Restoring previous state");
Go to File -> invalidate caches / Restart. And let Android Studio index your project again. It works for me.