When I create a new - > Google - > Google Maps Activity it creates everything correctly.
Then I add the key in google_maps_api.xml
.
<stringname="google_maps_key" templateMergeStrategy="preserve" translatable="false">
chave . . .
</string>
However, when compiling the project it has the following error :
Error: Execution failed for task ': app: dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command' C: \ Program Files (x86) \ Java \ jdk1.8.0_65 \ bin \ java.exe '' finished with non-zero exit value 2 Information: BUILD FAILED Information: Total time: 13:53 Information: 1 error Information: 0 warnings Information: See complete output in console
It automatically puts in the dependencies (compile 'com.google.android.gms: play-services: 9.4.0')
If I switch to version 8.4.0 (compile 'com.google.android.gms: play-services: 8.4.0') it stops giving the error, but when I enter the Map Activity, it does not appear. only the google logo appears in the lower left corner of the screen.