Always shows me the error in the massages
java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener
My pr
Yes, it happens. You can fix it easily.
First Method: Open build.gradle(Module: app) under Gradle Scripts and change version alpha3 to alpha1 and Sync now
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
Second Method: Open style.xml under res -> values -> style.xml and change this line
style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
put Base.
before Theme.AppCompat.Light.DarkActionBar like
style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
Hope problem will be solved.
Use:
implementation 'com.android.support:appcompat-v7:27.1.1'
and of course
compileSdkVersion 27
Until version 28 full ver comes!
The issue you faced was due to using alpha version of AppCompat library. Use stable version to get rid of this issue now and in future.
android.support
stable versionCurrently 27.1.1 is latest version of AppComactV7. You can see Maven Repo link to find out latest.
final def SUPPORT_VERSION = "27.1.1"
implementation "com.android.support:appcompat-v7:$SUPPORT_VERSION"
implementation "com.android.support:design:$SUPPORT_VERSION" // use only if already using
I use definitions to have same version for all support versions. Also ignore design library if you are not already using it.
compileSdkVersion
and targetSdkVersion
(Optional)You also need to downgrade your compileSdkVersion
& targetSdkVersion
to remove some gradle warnings.
so use below versions
compileSdkVersion 27
targetSdkVersion 27
Read about Alpha & Beta releases.
You can fix it easily.
Open build.gradle(Module: app) under Gradle Scripts and update the version of appcompat to given below and Sync now
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
Go to
Gradle scripts>build.gradle(module app) > change 'com.android.support:appcompat-v7:28.0.0-alpha3' to 'com.android.support:appcompat-v7:28.0.0-alpha1'
You may have something other than alpha3 after "-v7:28.0.0-" whatever it is just change it to alpha1.