How To implement Quickblox video chat - android

I want to integrate quickblox videochat in my android application , but i am unable to find proper documentation, i had gone through quickblox website but it's not helpful and not easy to understand , if anyone help i will be thankful.

First, you need to enable signaling. Using below code, your ability to do call or receive the call.
QBRTCClient.getInstance(context).prepareToProcessCalls();
QBChatService.getInstance().getVideoChatWebRTCSignalingManager()
.addSignalingManagerListener(new QBVideoChatSignalingManagerListener() {
#Override
public void signalingCreated(QBSignaling qbSignaling, boolean createdLocally) {
if (!createdLocally) {
QBRTCClient.getInstance(context).addSignaling((QBWebRTCSignaling) qbSignaling);
}
}
});
Then, you need to add session callback that helps you incoming calls
QBRTCClient.getInstance(context).addSessionCallbacksListener(this);
Now, it overrides one of onReceiveNewSession, In this method, you will receive a call when an opponent is a call to you.
To place a call,
QBRTCTypes.QBConferenceType qbConferenceType = QB_CONFERENCE_TYPE_VIDEO;
List<Integer> opponents = new ArrayList<Integer>();
opponents.add(userid); //12345 - QBUser ID
//Set user information
Map<String, String> userInfo = new HashMap<>();
userInfo.put("key", "value");
//Init session
QBRTCSession session = QBRTCClient.getInstance(this).createNewSessionWithOpponents(opponents, qbConferenceType);
//Start call
session.startCall(userInfo);
To accept a call
#Override
public void onReceiveNewSession(QBRTCSession qbrtcSession) {
qbrtcSession.acceptCall(qbrtcSession.getUserInfo());
}

Getting Error -Program type already present: org.webrtc.CameraEnumerationAndroid$CaptureFormat Message{kind=ERROR, text=Program type already present: org.webrtc.CameraEnumerationAndroid$CaptureFormat, sources=[Unknown source file], tool name=Optional.of(D8)}
THIS IS MY APP LEVEL GRADLE
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.mindinfo.xchangemall.xchangemall"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-
rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
repositories {
mavenCentral()
}
dataBinding {
enabled = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation('com.google.apis:google-api-services-drive:v2-rev295-1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
//noinspection GradleCompatible
implementation 'com.android.support:multidex:1.0.3'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
implementation 'com.google.android.gms:play-services-plus:15.0.1'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.facebook.android:facebook-android-sdk:4.27.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.yahoo.mobile.client.android.util.rangeseekbar:rangeseekbar-
library:0.1.0'
testImplementation 'junit:junit:4.12'
implementation 'com.github.stfalcon:multiimageview:0.1'
implementation 'com.lorentzos.swipecards:library:1.0.9'
implementation 'com.github.midorikocak:currency-picker-android:1.1.9'
implementation 'com.baoyz.pullrefreshlayout:library:1.2.0'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-analytics:16.0.0'
implementation 'com.google.firebase:firebase-crash:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-config:16.0.0'
implementation 'com.google.firebase:firebase-invites:16.0.0'
implementation 'com.futuremind.recyclerfastscroll:fastscroll:0.2.5'
implementation 'me.relex:circleindicator:1.2.2#aar'
implementation('com.crashlytics.sdk.android:crashlytics:2.7.1#aar') {
transitive = true
}
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation "com.quickblox:quickblox-android-sdk-videochat-webrtc:3.8.1"
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
THIS IS MY PROJECT LEVEL GRADLE:-
buildscript {
// ext.kotlin_version = '1.2.30'
// ext.roomVersion = '1.0.0'
repositories {
mavenCentral()
google()
jcenter()
maven {
url 'https://maven.google.com/' }
maven {
url 'https://maven.fabric.io/public'
}
maven { url "https://raw.githubusercontent.com/HyphenateInc/Hyphenate-
SDK-Android/master/repository" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'io.fabric.tools:gradle:1.25.4'
}
}
allprojects {
repositories {
mavenCentral()
jcenter()
maven {
url "https://github.com/QuickBlox/quickblox-android-sdk-
releases/raw/master/"
}
maven {
url 'https://maven.google.com/' }
maven { url "https://raw.githubusercontent.com/HyphenateInc/Hyphenate-
SDK-Android/master/repository" }
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Related

Failed to resolve: support-compat unable to identify the error repository

I am getting an error failed to resolve: support-compat in Android Studio while trying to build. I could not identify which repository is having the error. please see my app grundle. How to check which repository is failed or anything I need to add in project grundle. please suggest me.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.beingdev.magicprint"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
useLibrary 'org.apache.http.legacy'
manifestPlaceholders = [onesignal_app_id : "5c3d7b9b-1874-463f-8081-1c3439ccb3ea",
onesignal_google_project_number: "REMOTE"]
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled true
useProguard true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
release {
minifyEnabled false
shrinkResources false
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.onesignal:OneSignal:3.10.5#aar'
//database operation lib
implementation 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
//google play services
implementation 'com.google.android.gms:play-services-gcm:11.0.1'
implementation 'com.google.android.gms:play-services-analytics:11.0.1'
implementation 'com.google.android.gms:play-services-location:11.0.1'
implementation 'com.google.android.gms:play-services:11.0.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.daimajia.easing:library:2.0#aar'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.github.GrenderG:Toasty:1.2.5'
implementation 'com.daimajia.androidanimations:library:2.3#aar'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.daimajia.slider:library:1.1.5#aar'
implementation "com.android.support:recyclerview-v7:27.1.1"
implementation 'com.android.support:cardview-v7:27.1.1'
implementation "com.android.support:support-annotations:28.0.0"
implementation 'com.webianks.library:easy-feedback:1.0.2'
implementation 'com.geniusforapp.fancydialog:FancyDialog:0.1.4'
implementation('com.mikepenz:crossfadedrawerlayout:1.0.1#aar')
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.kaopiz:kprogresshud:1.1.0'
implementation 'com.getkeepsafe.taptargetview:taptargetview:1.11.0'
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
implementation 'com.github.yesidlazaro:GmailBackground:1.2.0'
//Field and method binding for Android views which uses annotation processing
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1',{
exclude group: 'com.android.support'
}
implementation 'com.airbnb.android:lottie:2.2.5'
implementation 'com.firebaseui:firebase-ui:0.4.4'
//Libraries I've included
implementation 'com.google.firebase:firebase-database:9.4.0'
//Stylish edittextbox
implementation 'com.github.florent37:materialtextfield:1.0.7'
//radiogroup
implementation 'com.github.Gavras:MultiLineRadioGroup:v1.0.0.6'
//ticker textview
implementation 'com.tomer:fadingtextview:2.5'
// Dexter runtime permissions
implementation 'com.karumi:dexter:4.2.0'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
and my project grundle as follows
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
//use maven repo
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven { url 'https://jitpack.io' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
i think your project gradle need some changes, mentioned below. put google() first.
buildscript {
repositories {
google() <-------put this first
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google() <-------put this first
jcenter()
//use maven repo
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven { url 'https://jitpack.io' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing

I am getting this error while building my app (or running it).
Caused by: com.android.tools.r8.utils.AbortException: Error: Interface com.google.android.gms.common.data.DataBuffer(classpath class) used as super class of com.google.android.gms.games.multiplayer.ParticipantBuffer.
I have tried everything (from cleaning up project to invalidating caches and restarting android studio), but this error is not going anywhere and I have no idea what to do. So can help me find any solution for this error?
Here is my app level gradle:
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 {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
lintOptions {
disable 'ValidFragment'
checkReleaseBuilds false
}
defaultConfig {
applicationId "com.littmedia.littapp"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0.20170624"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
implementation project(':firebase_plugin')
implementation project(':sdk')
implementation('com.crashlytics.sdk.android:crashlytics:2.6.7#aar') {
transitive = true;
}
implementation project(':facebook')
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.code.gson:gson:2.8.4'
implementation 'com.google.android.gms:play-services-base:16.0.1'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation 'com.google.android.gms:play-services-games:16.0.0'
implementation 'com.google.android.gms:play-services-plus:16.0.0'
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-appindexing:16.0.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.maps.android:android-maps-utils:0.3'
implementation 'ch.acra:acra:4.9.2'
implementation 'com.koushikdutta.ion:ion:2.1.9'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'io.reactivex:rxjava:1.1.9'
implementation 'com.jakewharton.timber:timber:4.5.1'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'org.jdeferred:jdeferred-android-aar:1.2.4'
implementation('de.greenrobot:greendao:1.3.7#jar') {
exclude group: 'com.google.android', module: 'support-v4'
}
implementation 'org.apache.commons:commons-lang3:3.3.2#jar'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
And here is my project level gradle file
buildscript {
repositories {
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'com.google.firebase:firebase-plugins:1.1.1'
}
}
allprojects {
repositories {
mavenCentral()
maven { url "https://dl.bintray.com/drummer-aidan/maven" }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Let me know if you need anything else. Thanks in advance.

fire base and google play services can't resolve exception

I'm trying to build my application with the following gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '28.0.0 rc1'
defaultConfig {
applicationId "com.wallet"
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
dexOptions {
javaMaxHeapSize "4g"
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-
core:2.2.2', {
exclude group: 'com.android.support', module: 'support-
ancom.android.supportnotations'
})
implementation('com.alibaba.android:ultraviewpager:1.0.6.1#aar') {
transitive = true
}
implementation 'com.android.support:percent:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.koushikdutta.ion:ion:2.2.1'
implementation 'com.airbnb.android:lottie:2.5.4'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.orhanobut:logger:2.1.1'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-base:15.0.1'
implementation 'com.google.android.gms:play-services-vision:15.0.2'
implementation 'com.google.android.gms:play-services-ads-identifier:15.0.1'
implementation 'io.michaelrocks:libphonenumber-android:8.8.2'
implementation 'com.github.tamir7.contacts:contacts:1.1.7'
implementation 'com.cleveroad:slidingtutorial:1.0.8'
implementation "android.arch.persistence.room:runtime:1.1.1"
implementation "android.arch.lifecycle:runtime:1.1.1"
implementation "android.arch.lifecycle:extensions:1.1.1"
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
implementation 'com.appyvet:materialrangebar:1.4'
implementation "com.github.nisrulz:qreader:2.1.2"
implementation project(':library')
testImplementation 'junit:junit:4.12'
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
apply plugin: 'com.google.gms.google-services'
project' gradle file:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
maven { url "https://dl.bintray.com/krazykira/maven" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I'm getting the following error:
Failed to resolve: play-services-base
Failed to resolve: play-services-ads-identifier
when I change the play-services-base version to 15.0.0 this error is fixed but when I do the same for play-services-ads-identifier there's no change. Is there anyway for me to understand what is the problem or how can I make the app work with the current versions?
Any help would be appreciated 3>
For reasons unknown to me, google() must appear before jcenter() in the list of repositories, as is shown in the documentation.
buildscript {
repositories {
google() // <== CHANGED
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google() // <= CHANGED
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
maven { url "https://dl.bintray.com/krazykira/maven" }
}
}

Databinding Redirection to xml is not working in android studio 3.1.2

I have updated android studio to latest version(3.1.2) and now when I click on BindingClass with ctrl it's not opening xml file for it which was working in previous version. And I have tried the same thing with creating new project in same version of android studio but it's working on it.
So I am thinking that I have added some wrong dependencies or I have done something wrong. So please guide me regarding this issue.
Here is the build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'realm-android'
apply plugin: 'io.fabric'
android {
compileSdkVersion 27
defaultConfig {
applicationId = "xxx.xxx.xxx"
minSdkVersion 18
targetSdkVersion 27
versionCode 9
versionName "1.0.8"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.config
buildConfigField 'Boolean', 'enableCrashlytics', 'false'
}
debug {
buildConfigField 'Boolean', 'enableCrashlytics', 'false'
}
}
flavorDimensions "default"
productFlavors {
basic {
// applicationIdSuffix ".basic"
// versionName "0.1.9"
}
admin {
// applicationIdSuffix ".admin"
// versionName "0.1.9-admin"
}
}
dataBinding {
enabled = true
}
packagingOptions {
exclude 'META-INF/maven/com.squareup.okhttp3/okhttp/pom.properties'
exclude 'META-INF/maven/com.squareup.okhttp3/okhttp/pom.xml'
exclude 'META-INF/maven/com.squareup.okio/okio/pom.properties'
exclude 'META-INF/maven/com.squareup.okio/okio/pom.xml'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation(name: 'wikitudesdk', ext: 'aar')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.google.android.gms:play-services-maps:11.6.0'
implementation 'com.google.android.gms:play-services-location:11.6.0'
implementation 'com.google.android.gms:play-services-analytics:11.6.0'
testImplementation 'junit:junit:4.12'
implementation 'com.squareup.okhttp3:okhttp:3.5.0'
implementation('com.squareup.retrofit2:retrofit:2.1.0') {
exclude module: 'okhttp'
}
implementation('com.squareup.retrofit2:adapter-rxjava:2.1.0') {
exclude module: 'okhttp'
}
implementation('com.squareup.retrofit2:converter-gson:2.1.0') {
exclude module: 'okhttp'
}
implementation('com.squareup.okhttp3:logging-interceptor:3.5.0') {
exclude module: 'okhttp'
}
implementation 'com.google.dagger:dagger:2.8'
annotationProcessor 'com.google.dagger:dagger-compiler:2.8'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'io.reactivex:rxjava:1.1.6'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.android:flexbox:0.3.0-alpha2'
annotationProcessor 'org.parceler:parceler:1.1.6'
implementation 'org.parceler:parceler-api:1.1.6'
implementation 'com.google.guava:guava:20.0'
implementation 'me.zhanghai.android.materialprogressbar:library:1.3.0'
implementation 'com.facebook.fresco:fresco:1.1.0'
implementation 'com.facebook.fresco:animated-gif:1.1.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.caverock:androidsvg:1.2.1'
implementation 'joda-time:joda-time:2.9.3'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'io.realm:android-adapters:1.3.0'
implementation 'com.mobsandgeeks:android-saripaar:2.0.2'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.jakewharton.timber:timber:4.5.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.7.1#aar') {
transitive = true
}
implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
implementation 'com.google.android.exoplayer:exoplayer:r2.2.0'
implementation 'com.github.faruktoptas:FancyShowCaseView:0.1.0'
implementation 'com.google.firebase:firebase-messaging:11.6.0'
implementation 'com.facebook.android:facebook-android-sdk:4.28.0'
implementation 'com.shawnlin:number-picker:2.4.4'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.intuit.sdp:sdp-android:1.0.4'
implementation 'com.google.firebase:firebase-perf:11.6.0'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.uphyca:stetho_realm:2.1.0'
// debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
// releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
// testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
}
repositories {
flatDir {
dirs 'libs'
}
maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'com.google.gms.google-services'
Here is the Project Level build.gradle
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "io.realm:realm-gradle-plugin:3.0.0"
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'me.tatarka:gradle-retrolambda:3.6.1'
classpath 'com.google.firebase:firebase-plugins:1.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {url "https://jitpack.io"}
maven {url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo'}
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Thank you so much.
For opening related XML
Android Studio has a new icon for related XML redirection. My AS version is 3.2.1.
An hack for opening Binding Class.
Ctrl + N (Open File)
Type ActivityMainBinding {or first letters - Amb for ActivityMainBinding if you are smart enough :)
Hit enter on ActivityMainBinding
FYI I faced this problem in Java class only, [Go to declaration] works well with kotlin.
add below code into the project level gradle file.
jcenter()
below gradle file in the project it working fine.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Android Studio "Unable to merge dex"

I keep getting this error. I cleaned everything, build, Rebuild, jumbomode, MultidexApplication I tried everything as possible I can, but everything didn't work out.
Sometimes it is necessary to remove the dependency one by one, but now it is useless.
I got stuck on this error from this error more than a week. anybody knows how to fix it out?
There's my config files below.
app.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven {
url 'https://maven.fabric.io/public'
}
}
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId ""
minSdkVersion 21
targetSdkVersion 26
versionCode 6
versionName "1.0.5"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
/*manifestPlaceholders = [ onesignal_app_id: "",
onesignal_google_project_number: "REMOTE" ]*/
manifestPlaceholders = [
manifestApplicationId : "${applicationId}",
onesignal_app_id : "",
onesignal_google_project_number: ""
]
}
dexOptions {
// jumboMode true
javaMaxHeapSize "4g"
preDexLibraries = false
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
ext.enableCrashlytics = false
}
}
dataBinding {
enabled = true
}
}
dependencies {
//noinspection GradleCompatible
implementation 'com.android.support:design:26.1.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:support-v4:26.1.0'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
// implementation 'com.android.support:customtabs:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
// one signal
implementation 'com.onesignal:OneSignal:3.7.1#aar'
// zendesk
implementation 'com.zendesk:sdk:1.10.0.1'
implementation('com.zendesk:sdk:1.10.0.1#aar') {
transitive = true
}
// UnifyID
implementation 'id.unify.sdk:sdk:0.8.1'
implementation 'com.android.support:multidex:1.0.2'
// circle ImageView
implementation 'de.hdodenhof:circleimageview:2.1.0'
// fabric
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true
}
// fitChart
implementation 'com.txusballesteros:FitChart:1.0'
// retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
// google play services(google fit, google map, location)
//noinspection GradleCompatible,UseOfBundledGooglePlayServices
// implementation 'com.google.android.gms:play-services:11.8.0'
//noinspection GradleCompatible
implementation 'com.google.android.gms:play-services-fitness:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
// implementation 'com.google.android.gms:play-services-location:11.8.0'
// implementation 'com.google.android.gms:play-services-places:11.8.0'
// firebase
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
// facebook
implementation 'com.facebook.android:facebook-android-sdk:4.25.0'
implementation 'com.twitter.sdk.android:twitter:3.1.1'
// glide
implementation 'com.github.bumptech.glide:glide:4.5.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0'
}
project.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
//apply plugin: 'com.jfrog.artifactory'
//apply plugin: 'maven-publish'
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://maven.google.com" }
//maven { url "https://artifacts.unify.id" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.0'
classpath 'io.fabric.tools:gradle:1.25.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// classpath 'io.fabric.tools:gradle:1.22.1'
//classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven {
url "http://gradle.unify.id/artifactory/gradle-release"
credentials {
username = ""
password = ""
}
}
maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
maven { url "https://maven.google.com" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Try the different version combinations of gms:play-services:X.X.X library and also try by adding this code in your app module build.gradle file
android {
defaultConfig {
multiDexEnabled true
}
}
If u overridinig your Application class you need to do this
public class MyApplication extends SomeOtherApplication {
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
if that is not the case than u should in your manifest file in your application tag add this
<application
android:name="android.support.multidex.MultiDexApplication" >
...
</application>
Hope this will help you,in my app I have multidex and everything is working fine.

Categories

Resources