Android Preview screen shows android...coordinatorlayout

Novice needs help getting started. I am working through tthe book “Android Programming in Kotlin: Starting with an App.” This is my first program, and I just started Android Studio.

When I start an app in Android Studio 3.1.3 using “include Kotlin” and select “Basic activity,” as instructed in the book, the Android Preview screen shows “android…CoordinatorLayout” instead of the Hello World! text that should be on the screen.

When I Run the App, it works in an emulator, showing the Hello World! text, but I cannot see the text on the xml file Design screen because it is grayed out and has the “android…CoordinatorLayout” text on it.

I read a forum entry somewhere that said I should use an “AppCompat” theme to fix this. I did that and the screen now shows blank - I cannot see the Hello World! text in the xml file Design preview. “android…CoordinatorLayout” is gone, but there is no text in its place.

Any help would be greatly appreciated. Thank you.

Your problem is based on layout files and android studio. It isn’t actually a Kotlin problem. Having said that, are there any error message or warning messages displayed? Have you tried the “restart(invalidate caches)” option in the file menu?

Thank you for your reply.

No error messages. I tried restart/invalidate cache. I also uninstalled and reinstalled Android Studio.

I will address this in an Android Studio forum. Just thought someone here might be familiar with the problem.