android/view/view$onUnhandledKeyEventListener (onMeasure error)

 ̄綄美尐妖づ 提交于 2019-11-27 05:10:15

I found the answer, but I'm not sure this is the best answer. But this fix all the issue.

The error could be because of a bug in the API 28.0.0-alpha3 which may mess around with the backward compatibility (I'm not completely sure about it yet).

build.gradle(Module: app) (before fix)-->

build.gradle(Module: app)

compileSdkVersion 28

targetSdkVersion 28

implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'

I fixed the error by reducing the API version to 27.1.1 and changing the compileSdkVersion, targetSdkVersion and implementation.

build.gradle(Module: app)(after fixing error) -->

build.gradle(Module: app)

To fix the error just change

compileSdkVersion 27

targetSdkVersion 27

implementation 'com.android.support:appcompat-v7:27.1.1'

And Re-build the Gradle. This will clear all the error and warning about the ActionBar and toolbar.

no error and working toolbar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!