ClassNotFoundException:android.view.View $ OnUnhandledKeyEventListener

时间:2018-09-08 21:09:24

标签: android android-studio render preview android-studio-3.1.4

当我在Android Studio上启动一个新项目,然后想要查看“ Hello World!”的预览时,该程序不会让我丢弃此消息。

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

Message Errors

My Android Studio version

我创建的项目使用API​​ 15 Android 4.0.3 IceCreamSandwich作为最低SDK级别。

1 个答案:

答案 0 :(得分:0)

View$OnUnhandledKeyEventListener was added in API Level 28

  

我创建的项目使用API​​ 15 Android 4.0.3 IceCreamSandwich

您需要将渲染视图设置为至少该级别,以正确查看预览。 (请参阅当前显示28的Android图标)

或者您可以将compileSdk设置为28版,这不会影响您在更低的minimumSdk版本上运行应用的能力

相关问题