5

I fixed again and again but the final error I'm having is:

java.lang.NoClassDefFoundError: com.google.android.gms.internal.zzno

My build.gradle is below:

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.3.0'
    classpath 'com.google.gms:google-services:1.5.0-beta2'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
    repositories {
        jcenter()
    }
}

subprojects {
    repositories {
        mavenCentral()
        maven { url 'http://devrepo.kakao.com:8088/nexus/content/groups/public/' }
    }
}

And another build.gradle is below :

    apply plugin: 'com.android.application'
    apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

dexOptions {
    javaMaxHeapSize "4g"
}

defaultConfig {
    applicationId "com.example.min.photozzle"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:multidex:1.0.1'

    compile group: 'com.kakao.sdk', name: 'kakaolink', version: '1.1.0'
    compile group: 'com.kakao.sdk', name: 'kakaostory', version: '1.1.0'// 카카오스토리 sdk를 사용하기 위해 필요.
    compile group: 'com.kakao.sdk', name: 'kakaotalk', version: '1.1.0'    // 카카오톡 sdk를 사용하기 위해 필요.
    compile group: 'com.kakao.sdk', name: 'push', version: '1.1.0'    // push sdk를 사용하기 위해 필요.

    compile 'com.squareup.retrofit:retrofit:1.9.0'
    //compile 'com.google.android.gms:play-services-gcm:8.3.0'
    compile "com.google.android.gms:play-services:8.3.0"
    compile 'org.apache.directory.studio:org.apache.commons.io:2.4'

}

Fianlly my manifest is below :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.min.photozzle" >

<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

<permission
    android:name="com.example.min.photozzle.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />

<uses-permission android:name="com.example.min.photozzle.permission.C2D_MESSAGE" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <activity android:name=".StoryGame" />
    <activity android:name=".StoryMode" />
    <activity android:name=".CustomMode" />
    <activity android:name=".Title" />
    <activity android:name=".Splash" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <receiver
        android:name="com.google.android.gms.gcm.GcmReceiver"
        android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>

            <!-- Receives the actual messages. -->
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />

            <!-- Receives the registration id. -->
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

            <category android:name="com.example.min.photozzle" />

        </intent-filter>
    </receiver>

    <service
        android:name=".GCM.RegistrationIntentService"
        android:exported="false" >
    </service>

    <service
        android:name=".GCM.MyInstanceIDListenerService"
        android:exported="false" >
        <intent-filter>
            <action android:name="com.google.android.gms.iid.InstanceID"/>
        </intent-filter>
    </service>

    <service
        android:name=".GCM.MyGcmListenerService"
        android:exported="false" >
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
        </intent-filter>
    </service>


    <meta-data
        android:name="com.kakao.sdk.AppKey"
        android:value="@string/kakao_app_key" />
</application>

And our error log is below:

12-08 20:16:32.306  19305-19305/? E/dalvikvm﹕ Could not find class 'com.google.android.gms.internal.zzqq$zzd', referenced from method com.google.android.gms.measurement.internal.zzt.zzBK
12-08 20:16:32.306  19305-19305/? E/dalvikvm﹕ Could not find class 'com.google.android.gms.internal.zzqq$zzd', referenced from method com.google.android.gms.measurement.internal.zzt.zzBK
12-08 20:16:32.311  19305-19305/? E/dalvikvm﹕ Could not find class 'com.google.android.gms.internal.zzqq$zzc', referenced from method com.google.android.gms.measurement.internal.zzt.zzBK
12-08 20:16:32.311  19305-19305/? E/dalvikvm﹕ Could not find class 'com.google.android.gms.internal.zzqq$zzd', referenced from method com.google.android.gms.measurement.internal.zzt.zza
12-08 20:16:32.381  19305-19305/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.example.min.photozzle, PID: 19305
    java.lang.NoClassDefFoundError: com.google.android.gms.internal.zzno
            at com.google.android.gms.measurement.internal.zzx.zzj(Unknown Source)
            at com.google.android.gms.measurement.internal.zzt.<init>(Unknown Source)
            at com.google.android.gms.measurement.internal.zzx.zzBQ(Unknown Source)
            at com.google.android.gms.measurement.internal.zzt.zzaU(Unknown Source)
            at com.google.android.gms.measurement.AppMeasurementContentProvider.onCreate(Unknown Source)
            at android.content.ContentProvider.attachInfo(ContentProvider.java:1591)
            at android.content.ContentProvider.attachInfo(ContentProvider.java:1562)
            at android.app.ActivityThread.installProvider(ActivityThread.java:5233)
            at android.app.ActivityThread.installContentProviders(ActivityThread.java:4828)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4711)
            at android.app.ActivityThread.access$1600(ActivityThread.java:175)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1368)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5602)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
            at dalvik.system.NativeStart.main(Native Method)

I googled it for an hour and introduced that but that doesn't work well for me. Am I'm trying to use GCM for my application.

Damian Kozlak
  • 7,065
  • 10
  • 45
  • 51
  • http://stackoverflow.com/questions/33161671/java-lang-noclassdeffounderror-com-google-android-gms-internal-zzmp – IntelliJ Amiya Dec 08 '15 at 11:31
  • remove `classpath 'com.google.gms:google-services:1.5.0-beta2'` – IntelliJ Amiya Dec 08 '15 at 11:31
  • 1
    @IntelliJAmiya then I got 'Error:(2, 0) Plugin with id 'com.google.gms.google-services' not found.' And I agree with this error... –  Dec 08 '15 at 11:37
  • Have a look here http://stackoverflow.com/questions/30527369/error-could-not-find-com-google-gmsgoogle-services1-0-when-adding-google-ser – IntelliJ Amiya Dec 08 '15 at 11:39
  • I already looked at that... but nothing new isn't it? –  Dec 08 '15 at 11:49
  • If you are trying to use GCM for your app, please try the official repo here:https://github.com/google/gcm/tree/master/samples/android/gcm-demo – bjiang Dec 09 '15 at 00:33
  • 1
    I have the same problem, but with com/google/android/gms/internal/zzsa class. Anyone find the solution? – Elvis Oliveira Feb 03 '16 at 13:47

2 Answers2

0

I encounter the same issue. And add content in following file into proguard-project.txt helps. Please give it a try.

https://github.com/google/google-api-java-client-samples/blob/master/calendar-android-sample/proguard-google-api-client.txt

Easton L.
  • 2,904
  • 1
  • 14
  • 15
-1
classpath 'com.google.gms:google-services:+'

try this line in the top level gradle.build should retrieve the latest version of google services pack, maybe thats the issue.

Daniel Netzer
  • 2,151
  • 14
  • 22