How to solve android error for google gms

android Nov 5, 2016

Hello everybody, I have some problem to run my application in my phone and generate APK file but don’t have problem gradle build, why?

I have this error and search google to solve this, but unfortunately solution cannot solve my problem.

android duplicate entry: com/google/android/gms/internal/zzahn.class

I found solve my problem in Stack Overflow which so lucky from me

My problem from add some library in dependency with google play because my application use google map and authenticate with google sign-in then I comment out for similar and call 1 for all google play service to solve my problem successfully.

compile ''
//compile ''
//compile ''
//compile ''

before that I have problem with multidex, add this in gradle

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.0"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 21

        // Enabling multidex support.
        multiDexEnabled true

dependencies {
  compile ''

and add the MultiDexApplication class from the multidex support library to the application element in manifest file.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""


Minseo Chayabanjonglerd

Android Developer ผู้เป็นเจ้าของบล็อก MikkiPastel ที่ชอบทำหลายๆอย่างนอกจากเขียนแอพแอนดรอยด์ เช่น เขียนบล็อก เขียนแชทบอท เรียนออนไลน์ อ่านหนังสือ วาดรูปเล่น ดู netfilx สั่งอาหารอร่อยๆกัน เป็นต้น

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.