1

I have build a simple chat apps using quickblox in android studio2.2.1, its working fine with quickblox-android-0.8.1.jar.
But now i want to add attachment to it. I am using four more individual .jar for that(content, core, messages, chat 2.5.1).
I have followed quickblox website guidance. But getting zip exception duplicate entry com/quickblox/BuildConfig.class. What am i doing wrong? help build.gradle

[https://i.stack.imgur.com/m9XRj.png]

Rubycon
  • 18,156
  • 10
  • 49
  • 70
Dev b
  • 17
  • 6
  • please show your gradle file – Rubycon Mar 21 '17 at 07:53
  • 1
    Sir, which one??? App level or Project level gradle?? – Dev b Mar 21 '17 at 08:07
  • project, we need to check your dependencies part – Rubycon Mar 21 '17 at 08:17
  • buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } – Dev b Mar 21 '17 at 10:59
  • } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:24.2.1' compile files('libs/quickblox-android-sdk-chat-2.5.1.jar') compile files('libs/quickblox-android-sdk-core-2.5.1.jar') compile files('libs/quickblox-android-sdk-messages-2.5.1.jar') compile files('libs/quickblox-android-sdk-content-2.5.1.jar') testCompile 'junit:junit:4.12' } – Dev b Mar 21 '17 at 11:01
  • Please add it to your origin question and format properly – Rubycon Mar 21 '17 at 14:56
  • Sir, i think quick-android-sdk-0.8.2.jar and quickblox-android-sdk-core-2.5.1.jar, these two jar (with two other jar) are creating exception.sir is it necessary to add this quick-android-sdk-0.8.2.jar? i have tried removing the quick-android-sdk-0.8.2.jar but after that there are so many problem like 'QBCallback cannot be resolve' etc. So feeling very helpless with Quickblox at that moment. what should i do?? – Dev b Mar 21 '17 at 15:13
  • Answered your question separately – Rubycon Mar 21 '17 at 16:24

1 Answers1

0

You have to remove quickblox-android-sdk-0.8.2.jar dependency and replace it with

allprojects {
    repositories {
        maven {
            url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
        }
    }
}

def qbSdkVersion = '2.5.1'

dependencies {
    сompile "com.quickblox:quickblox-android-sdk-core:$qbSdkVersion"
    сompile "com.quickblox:quickblox-android-sdk-chat:$qbSdkVersion"
    сompile "com.quickblox:quickblox-android-sdk-content:$qbSdkVersion"
    сompile "com.quickblox:quickblox-android-sdk-messages:$qbSdkVersion"
    сompile "com.quickblox:quickblox-android-sdk-customobjects:$qbSdkVersion"
}

And also,

you have to adapt your code to QuickBlox Android SDK 2.x family. Android SDK 0.8 is too old and it was some majot changes in 1.x and 2.x.

However, I recommend you to updated to latest 3.3 version https://quickblox.com/developers/Android#Framework_changelog

Rubycon
  • 18,156
  • 10
  • 49
  • 70
  • i have added library as per your suggestion but this time i m not getting many Quickblox method like QBCallback. so what should i do?? – Dev b Mar 22 '17 at 12:00
  • I propose you to start from here https://quickblox.com/developers/Android , how to work with latest QuickBlox API – Rubycon Mar 22 '17 at 20:39
  • sir, i have followed quickblox site as per your advice for the new sdk3.3.0 but i do not understand the flow of Signin process. it has vastly change the entire conception in new quickblox sdk. sir, i just want to know the Flow of Signin(user).plz help in this context. – Dev b Mar 24 '17 at 16:17
  • here it is https://quickblox.com/developers/SimpleSample-users-android#Sign_In_.26_Social_authorization – Rubycon Mar 25 '17 at 15:21
  • Thanks for reply, but i am getting nullpointerexception when login button click, btw i am using quickblox sdk 2.5.1 – Dev b Mar 25 '17 at 15:41