cometchat / chat-sdk-android

Text Chat SDK for Android
https://www.cometchat.com
22 stars 12 forks source link

Uable to build app with comet chat lib #2

Closed pradeeprkotha closed 5 years ago

pradeeprkotha commented 5 years ago

I am using following comet chat library implementation 'com.cometchat:pro-android-chat-sdk:1.5.+'

I am getting following error while running the application.

error: cannot access zza class file for com.google.android.gms.common.internal.safeparcel.zza not found

yadavmangesh commented 5 years ago

Hey @pradeeprkotha Can you please share your app level build.gradle.Seems like your issue with your play service You can refer to this issue https://stackoverflow.com/questions/52179251/error15-55-error-cannot-access-zza-class-file-for-com-google-android-gms-co

pradeeprkotha commented 5 years ago

Hi, Please find the gradle file.

##########################################

import java.text.DateFormat import java.text.SimpleDateFormat

def getDateTime() { DateFormat df = new SimpleDateFormat("yyyy-MM-dd")

return df.format(new Date())

}

buildscript { repositories { maven { url 'https://maven.fabric.io/public' } }

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}

} apply plugin: 'com.android.application' apply plugin: 'io.fabric'

repositories { google() jcenter() maven { url 'https://maven.google.com' } maven { url 'https://maven.fabric.io/public' } }

android { compileSdkVersion 28 buildToolsVersion '28.0.3'

defaultConfig {
    applicationId "com.socioplanet"
    minSdkVersion 27
    targetSdkVersion 28
    versionCode 20
    versionName "2.2.1"
    // Enabling multidex support.
    multiDexEnabled true
    resConfigs "en"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }

}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

dexOptions {
    javaMaxHeapSize "4g" //specify the heap size for the dex process
    preDexLibraries = false //delete the already predexed libraries
    jumboMode = true
    incremental true
}

lintOptions {
    abortOnError false
}

signingConfigs {
    releaseApp {
        storeFile file('socioplanet.jks')
        storePassword 'socioplanet2017'
        keyAlias 'socioplanet'
        keyPassword 'socioplanet2017'
    }
}

buildTypes {

    debug {
        debuggable true
        android.applicationVariants.all { variant ->
            variant.outputs.all {
                def appName = "SocioPlanet"
                def formattedDate = getDateTime()
                outputFileName = "${appName}-${formattedDate}-${variant.versionName}-${variant.versionCode}.apk"
            }
        }
    }

    release {
        signingConfig signingConfigs.releaseApp
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        debuggable false
        zipAlignEnabled true
        jniDebuggable false
        shrinkResources false
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "x86"
        }

        android.applicationVariants.all { variant ->
            variant.outputs.all {
                def appName = "SocioPlanet"
                def formattedDate = getDateTime()
                outputFileName = "${appName}-${formattedDate}-${variant.versionName}-${variant.versionCode}.apk"
            }
        }

        lintOptions {
            disable "ResourceType"
            disable 'MissingTranslation'
        }
    }
}

sourceSets.main {
    jniLibs.srcDir 'libs'
    jni.srcDirs = [] //disable automatic ndk-build call
}
/*aaptOptions {
    cruncherEnabled = false
}*/

// compileOptions { // sourceCompatibility JavaVersion.VERSION_1_8 // targetCompatibility JavaVersion.VERSION_1_8 // } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/ECLIPSE_.SF'
    exclude 'META-INF/ECLIPSE_.RSA'
}

}

dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation project(':linkedin-sdk')

// For Twitter Actions
implementation('com.twitter.sdk.android:twitter:2.1.1@aar') {
    transitive = true;
}
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
    transitive = true;
}

/* For video view */

//    compile 'com.github.rtoshiro.fullscreenvideoview:fullscreenvideoview:1.1.2'

/* For Mateiral Spinner view */

/* Below compile statement is used for compression video file */

/* Below compile statement is used for MQTT*/

//    compile files('libs/org.eclipse.paho.android.service-1.1.0.jar')

//    compile files('libs/org.eclipse.paho.client.mqttv3-1.1.0.jar')

/* Below compile statement is used for open attach view */
implementation('com.github.ozodrukh:CircularReveal:1.1.1@aar') {
    transitive = true
}

//compile 'net.the4thdimension:audio-wife:1.0.3'

//    compile 'com.github.hani-momanii:SuperNova-Emoji:1.1'

//    compile project(':supernova-emoji-library')
implementation project(':showcaselibrary')
implementation 'com.github.QuadFlask:colorpicker:0.0.13'

//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'

//noinspection GradleCompatible
implementation 'com.google.android.gms:play-services-auth:11.0.2'
implementation 'com.google.android.gms:play-services-plus:11.0.2'
implementation 'com.google.firebase:firebase-core:11.0.2'
implementation 'com.google.firebase:firebase-messaging:11.0.2'
implementation 'com.google.android.gms:play-services-maps:11.0.2'
implementation 'com.google.android.gms:play-services-location:11.0.2'
implementation 'com.google.android.gms:play-services-places:11.0.2'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.android.support:multidex:1.0.1'

// this is for get google map thumbnail
implementation 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.github.clans:fab:1.6.1'
implementation 'com.android.support:percent:27.1.1'

//This is for collage maker
implementation 'com.github.ParkSangGwon:TedPicker:v1.0.10'

//compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.github.rtoshiro.fullscreenvideoview:fullscreenvideoview:1.1.3a-SNAPSHOT'

//compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'junit:junit:4.12'
implementation 'com.google.android.gms:play-services-ads:11.0.2'

// compile files('libs/org.eclipse.paho.android.service-1.1.0.jar')
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.1'
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
implementation 'com.android.support:multidex:1.0.1'
implementation 'com.google.android.gms:play-services:11.0.2'
// implementation 'org.chat21.android:chat21:1.0.10'
compile 'com.vanniktech:emoji-ios:0.5.1'
implementation 'com.cometchat:pro-android-chat-sdk:1.5.+'

} apply plugin: 'com.google.gms.google-services' ##########################################################

yadavmangesh commented 5 years ago

@pradeeprkotha Please upgrade your Firebase Dependencies to latest. This issue may not be related to CometChat SDK

pradeeprkotha commented 5 years ago

Hi Mangesh,

Thanks for your reply, we are not using any firebase libs. without comchat sdk we are able to build app without any errors. we are getting issue whenever we add comchat SDK. Please help me out. Thanks!

On Wed, Jun 26, 2019 at 11:15 AM Mangesh Yadav notifications@github.com wrote:

@pradeeprkotha https://github.com/pradeeprkotha Please upgrade your Firebase Dependencies to latest. This issue may not be related to CometChat SDK

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cometchat-pro/android-chat-sdk/issues/2?email_source=notifications&email_token=AKUIEMDRRAEM7SIIWMXH5ATP4L7AHA5CNFSM4H3E4I52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYSMYBQ#issuecomment-505728006, or mute the thread https://github.com/notifications/unsubscribe-auth/AKUIEMD4GLIFNFZT6UBFJPDP4L7AHANCNFSM4H3E4I5Q .

-- Thanks & Regards Pradeep Reddy Kotha Mobile: 9030934522

yadavmangesh commented 5 years ago

Hey @pradeeprkotha
We were trying to replicate your problem at our end with your Dependencies. So if you upgrade to v1.7 implementation 'com.cometchat:pro-android-chat-sdk:1.7.2'that will solve your issue

For Latest Features in SDK v1.7, you can check our Documentation https://prodocs.cometchat.com/docs/android-quick-start

ranjanravi85 commented 5 years ago

Hello @pradeeprkotha Can you please update if your issue is resolved or not

pradeeprkotha commented 5 years ago

Hi Team,

Not yet. i will check again and let you know by EOD. Thanks!

On Thu, Jun 27, 2019 at 6:17 PM ranjanravi85 notifications@github.com wrote:

Hello @pradeeprkotha https://github.com/pradeeprkotha Can you please update if your issue is resolved or not

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cometchat-pro/android-chat-sdk/issues/2?email_source=notifications&email_token=AKUIEMEPFBOYYSXPO2RQFELP4SZHBA5CNFSM4H3E4I52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYXAA3Y#issuecomment-506331247, or mute the thread https://github.com/notifications/unsubscribe-auth/AKUIEMFNOQXNRAZHGID4HDTP4SZHBANCNFSM4H3E4I5Q .

-- Thanks & Regards Pradeep Reddy Kotha Mobile: 9030934522

adityagokula2210 commented 5 years ago

Marking the issue closed due to inactivity.

medalibenmansour commented 4 years ago

Hello,

I have the same issue with the two versions '1.5.+' and '1.7.2' of dependancy 'pro-android-chat-sdk' but when i have updated to 2.0.1 it works !

implementation 'com.cometchat:pro-android-chat-sdk:2.0.1'