Android Studio 3.1 does not render xml file due to a java class missing

后端 未结 5 1310
余生分开走
余生分开走 2020-12-29 09:55

Always shows me the error in the massages

java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener

My pr

5条回答
  •  长情又很酷
    2020-12-29 10:35

    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.

提交回复
热议问题