android/view/view$onUnhandledKeyEventListener (onMeasure error)

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

Leave a Comment