Finally I solved this problem. It was marked as newArchEnabled=true in gradle.properties under the android file. I made it false, then I did gradlew clean and restarted the project. My map problem was solved.