Duplicate class android.support.v13.view.** - android

apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion = '32.1.0 rc1'
defaultConfig {
applicationId "com.example.andrd_ado_vdo_tkbk_demo"
minSdkVersion 17
// minSdkVersion 14 the emoji lib will not work
//minSdkVersion 9
targetSdkVersion 30
multiDexEnabled true
versionCode 1
versionName "2022.01.09"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
}
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-annotations'
})
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
testImplementation 'junit:junit:4.13.2'
implementation 'com.squareup.okhttp3:okhttp:3.12.2'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'io.paperdb:paperdb:2.7.1'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'io.nlopez.smartlocation:library:3.3.3'
implementation 'com.android.support:multidex:1.0.3'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.google.android.gms:play-services-auth:11.4.2'
implementation 'com.google.firebase:firebase-auth:11.4.2'
implementation 'com.google.firebase:firebase-config:11.4.2'
implementation 'com.google.firebase:firebase-database:11.4.2'
implementation 'com.google.firebase:firebase-messaging:11.4.2'
implementation 'com.google.firebase:firebase-analytics:11.4.2'
implementation 'com.google.firebase:firebase-storage:11.4.2'
implementation 'com.google.firebase:firebase-invites:11.4.2'
implementation 'com.google.firebase:firebase-crash:11.4.2'
implementation 'com.afollestad.material-dialogs:core:0.9.1.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'com.jakewharton.rxrelay:rxrelay:1.2.0'
testImplementation('junit:junit:4.12')
implementation project(':emoticon')
}
apply plugin: 'com.google.gms.google-services'
I'm facsing this error whenever I try to run my android application:
Duplicate class android.support.v13.view.DragAndDropPermissionsCompat found in modules support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) and support-v13-25.0.0-runtime (com.android.support:support-v13:25.0.0) Duplicate class android.support.v13.view.DragStartHelper found in modules support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) and support-v13-25.0.0-runtime (com.android.support:support-v13:25.0.0) ..etc
I'm not sure what is the source of these errors since i'm not using any of these libraries. initially I had more of these errors but then removed the following:
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:25.0.0'

Related

Program type already present: com.google.android.gms.common.zza

I'm trying to implement mediation to my source code but I keep getting the following error:
Program type already present: com.google.android.gms.common.zza
apply plugin: 'com.android.application'
android {
android.defaultConfig.vectorDrawables.setUseSupportLibrary(true)
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries false
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 17
targetSdkVersion 28
renderscriptTargetApi 19
renderscriptSupportModeEnabled true
versionCode 13
versionName "2.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
vectorDrawables {
useSupportLibrary = true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.media:media:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.0.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.vectordrawable:vectordrawable:1.0.0'
implementation 'devlight.io:navigationtabbar:1.2.5'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.leo.simplearcloader:simplearcloader:1.0.+'
implementation 'com.google.code.gson:gson:2.6.2'
implementation 'com.squareup.retrofit2:retrofit:2.0.2'
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
implementation 'com.squareup.okhttp3:okhttp:3.3.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
implementation 'com.jakewharton.timber:timber:3.1.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-ads:15.0.0'
implementation 'com.github.vivchar:ViewPagerIndicator:1.1.0'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
implementation 'com.github.GrenderG:Toasty:1.3.0'
implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'com.google.android.exoplayer:exoplayer:r2.5.2'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.facebook.android:audience-network-sdk:5.+'
implementation 'com.google.android.ads.consent:consent-library:1.0.3'
implementation 'com.github.bhargavms:DotLoader:1.1.1'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
implementation 'com.github.chrisbanes:PhotoView:1.2.5'
implementation 'com.github.TutorialsAndroid:progressx:v2.0'
implementation 'com.orhanobut:hawk:2.0.1'
implementation 'com.github.Gavras:GIFView:v1.2'
implementation 'com.facebook.rebound:rebound:0.3.8'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'jp.co.cyberagent.android:gpuimage:2.0.3'
implementation "com.leinardi.android:speed-dial:2.0.1"
implementation 'com.jackandphantom.android:blurimage:1.2.0'
implementation 'com.google.ads.mediation:adcolony:4.1.2.0'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
I am actually a beginner, and I'm following the steps in google developer's documentation. I migrated my project to android X with no errors.
Can anyone help?

Failed to resolve com.github.bumptech.glide (build.gradle)

I am getting this error:
ERROR: Failed to resolve: com.github.bumptech.glide:okhttp3-integration:1.6.0-SNAPSHOT
Show in Project Structure dialog
Affected Modules: app
I tried adding stories library into my app and this happened.
The library is Status Stories
The other library for image loading is from bumptech.
My build.gradle(Module: app) file also it says that it cannot be synced:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.ozurak.mk"
minSdkVersion 19
targetSdkVersion 26
versionCode 1476
versionName "1.4.7.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
ignoreWarnings true //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-annotations'
})
//Intro Screen
implementation 'agency.tango.android:material-intro-screen:0.0.5'
//scrolling tab hide top
//noinspection GradleCompatible
implementation 'com.android.support:design:26.1.0'
implementation 'com.github.ksoichiro:android-observablescrollview:1.6.0'
//emoji disabler
implementation 'com.xw.repo:xedittext:2.1.0#aar'
//firebase
implementation 'com.google.firebase:firebase-storage:10.0.1'
implementation 'com.google.firebase:firebase-auth:10.0.1'
implementation 'com.google.firebase:firebase-database:10.0.1'
//android
implementation 'com.android.support:recyclerview-v7:26.+'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'
//circle image view
implementation 'de.hdodenhof:circleimageview:2.2.0'
//like button
implementation 'com.github.jd-alexander:LikeButton:0.2.3'
//image loader
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
//ExifInterface support
implementation "com.android.support:exifinterface:26.+"
//image picker
implementation 'com.github.nguyenhoanglam:ImagePicker:1.2.1'
//button
implementation 'com.beardedhen:androidbootstrap:2.3.2'
//image loader
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
//image scroll 7/8/2018
implementation 'com.github.Q42:AndroidScrollingImageView:1.3.3'
//dropdown list
implementation 'com.github.JayFang1993:DropDownMenu:v0.9'
//zoom
implementation 'com.ablanco.zoomy:zoomy:1.1.0'
//stories
implementation 'com.github.RahulJanagouda:StatusStories:1.0.1'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

Dynamsoft Android SDK clashes with okhttp3

I am working in a company project and there is a requirement to integrate Dynamsoft Android SDK for document scanning purpose. This problem is, when the sdk dependency is added to the current project, it get clashes with okhttp3 while giving this error on Build-console :
**Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Program type already present: okhttp3.Address
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.**
As it suggests in Developer console, okhttp3 has been excluded(actually tried in manifold ways) from Dynamsoft dependency yet problem remains.
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
buildToolsVersion "28.0.2"
compileSdkVersion 28
defaultConfig {
applicationId "no.aspit.capture"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
dev {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'okhttp3/internal/publicsuffix/publicsuffixes.gz'
}
}
kotlin {
experimental {
coroutines 'enable'
}
}
androidExtensions {
experimental = true
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.cardview:cardview:1.0.0-rc02'
implementation 'androidx.core:core-ktx:1.0.0-rc02'
implementation "android.arch.work:work-runtime-ktx:1.0.0-alpha08"
implementation 'androidx.preference:preference:1.0.0-rc02'
implementation 'androidx.fragment:fragment-ktx:1.0.0-rc02'
implementation 'androidx.legacy:legacy-support-v4:1.0.0-rc02'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.6.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.4.0'
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.6.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.ittianyu:BottomNavigationViewEx:1.2.4'
//noinspection GradleCompatible
implementation "com.android.support:design:26.1.0"
implementation 'com.squareup.picasso:picasso:2.71828'
//Joda time
implementation 'net.danlew:android.joda:2.9.9.4'
// Image Compression
implementation 'id.zelory:compressor:2.1.0'
//Stetho
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
//Dynumsoft
implementation ('com.dynamsoft:dynamsoftcamerasdk:2.0#aar'){
exclude group: 'com.squareup.okhttp3'
}
}
repositories {
maven {
url "http://download.dynamsoft.com/maven/dcs"
}
You can try to solve the conflicts as follows:
configurations.all {
all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
all*.exclude group: 'com.squareup.okio', module: 'okio'
resolutionStrategy.force 'com.squareup.okhttp3:okhttp:3.10.0'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.cardview:cardview:1.0.0-rc02'
implementation 'androidx.core:core-ktx:1.0.0-rc02'
implementation "android.arch.work:work-runtime-ktx:1.0.0-alpha08"
implementation 'androidx.preference:preference:1.0.0-rc02'
implementation 'androidx.fragment:fragment-ktx:1.0.0-rc02'
implementation 'androidx.legacy:legacy-support-v4:1.0.0-rc02'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.6.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.4.0'
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.6.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.ittianyu:BottomNavigationViewEx:1.2.4'
//noinspection GradleCompatible
implementation "com.android.support:design:26.1.0"
implementation 'com.squareup.picasso:picasso:2.71828'
//Joda time
implementation 'net.danlew:android.joda:2.9.9.4'
// Image Compression
implementation 'id.zelory:compressor:2.1.0'
//Stetho
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
//Dynumsoft
implementation ('com.dynamsoft:dynamsoftcamerasdk:2.0#aar')
}

Failed in gradle synchronizing

As my gradle file on app level is as:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.developer.pkcaller"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-iid:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/volley.jar')
implementation 'com.firebaseui:firebase-ui:2.1.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.hbb20:ccp:1.7.2'
implementation 'com.facebook.android:facebook-login:[4,5)'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'com.google.android.gms:play-services-analytics:16.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-plus:15.0.1'
//implementation 'com.google.android.gms:play-services:16.0.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.google.android.gms:play-services:12.0.1'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
And I got error is as follows:
error: cannot access zzbgl class file for
com.google.android.gms.internal.zzbgl not found
Please help me solve this. I am stuck in this. Please help me regarding I will be highly grateful to you.

Multiple dex files define Lcom/android/volley/toolbox/HttpStack;

error when build apk. here is my compleate gradile file, i am not able
to find the error
this error comes while i runnning this app on emularor in some times and while i am trying to create apk file too
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
multiDexEnabled true
applicationId "com.norjimm.bingle"
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
preDexLibraries = false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.+'
implementation 'com.android.support:support-v4:27.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:design:27.+'
implementation 'com.android.support:cardview-v7:27.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.code.gson:gson:2.7'
implementation 'com.roughike:bottom-bar:2.3.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.mindorks:placeholderview:0.7.2'
implementation 'com.codesgood:justifiedtextview:1.0.2'
implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1'
implementation 'com.github.myinnos:AlphabetIndex-Fast-Scroll-RecyclerView:1.0.8'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'com.rm:rmswitch:1.2.2'
implementation 'com.facebook.fresco:fresco:1.1.0'
implementation 'com.linchaolong.android:imagepicker:1.1'
implementation 'com.facebook.android:facebook-login:[4,5)'
implementation 'com.daprlabs.aaron:cardstack:0.3.1-beta0'
implementation 'com.github.CardinalNow:Android-CircleProgressIndicator:v0.2'
implementation 'com.hyman:flowlayout-lib:1.1.2'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.7'
implementation 'com.github.neurospeech:unofficial-linkedin-sdk-android:v1.1.4'
}
just delete this line from file:
implementation 'com.android.volley:volley:1.0.0'
its conflict with jar you use at 'libs' folder

Categories

Resources