the error is triggered by the command:
setContentView(R.layout.activity_item_list);
this code was generated by android studio , when creating a
you should paste the following to the bottom of your project's - build.gradle
// This is to fix the errors : java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
configurations.all {
resolutionStrategy.eachDependency { details ->
def requested = details.requested
if (requested.group == "com.android.support") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "26.+"
}
}
}
}
developer.android.com/studio/build/multidex