I updated Android studio to 3.1 and this error appears after update:
Program type already present: android.support.v13.view.DragAndDropPermissionsC
This may be happening because you have a duplicate in your build.gradle file. You are using different versions of the same libraries:
implementation 'com.google.firebase:firebase-auth:12.0.0'
implementation 'com.google.firebase:firebase-database:12.0.0'
implementation 'com.google.firebase:firebase-storage:12.0.0'
this may lead be the reason.Add maven { url "https://maven.google.com" } to your root level build.gradle ,Firebase dependencies are now available via maven.google.com