Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException:Could not find method viewBinding() forarguments[build_cnenzfs58wnjzkakfr1670it0$_run_closure1$_closure7@5f591b76]on object of type com.android.build.gradle.LibraryExtension.
Just change the version number of gradle in the last line of gradle-wrapper.properties, distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.6-all.zip