I have read similar Q/A here and here about this problem. All solution was to use latest plugins. The question is outdated and I need new configuration using latest versions
We need be specific to the things that you are using in your app for example if you are using location services instead of using it like this "implementation 'com.google.android.gms:play-services:17.0.0'" use it like this "implementation 'com.google.android.gms:play-services-location:17.0.0'" gradle file (app)