I get this problem when I use source code of Telegram in Android studio. So I use android studio preview 3.0.0 beta 2, gradle 4.1-all.zip, mainsdk:15. I did everything but i
Try removing the line:
compile 'com.google.android.gms:play-services:3.2.+'
If that works. Replace it with the specific parts of play-services you need, e.g:
compile 'com.google.android.gms:play-services-gcm:11.2.0'
for Google Cloud Messaging.
Try the below it worked for me
based off Dex error On Android Studio 3.0 Beta4