I am creating an android application using android studio. I want to use the following dependence \'com.google.gson:gson:2.8.5\'. I add it into my build.gradle of my app but
Alternatively: gradle doesn't play nice with what you need here. I would try replacing the line implementation 'com.google.gson:gson:2.8.5' with this:
gradle
implementation 'com.google.gson:gson:2.8.5'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'