ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener

314 Views Asked by At

When i start a new project on Android Studio and then i want to see the preview of the "Hello World!", the program don't let me and drops this message.

This is the capture of the xml and the preview, that don't shows the "Hellow World!" message.

Message Errors

My Android Studio version

The project that i create uses a API 15 Android 4.0.3 IceCreamSandwich as a minimun SDK level.

1

There are 1 best solutions below

0
OneCricketeer On

View$OnUnhandledKeyEventListener was added in API Level 28

The project that i create uses a API 15 Android 4.0.3 IceCreamSandwich

You will want to set the render view to be at least that level to view the preview correctly. (See the Android icon that currently says 28)

Or you can set the compileSdk to be version 28, which shouldn't affect your ability to run the app on lower minimumSdk versions