Android resource linking fail in Android -3.1.24? - android

I am Work on MVVM module app and Getting error : - C:\Users\123.gradle\caches\transforms-2\files-2.1\67afe2b5b1b4fe8a866b1004d9b96c04\core-1.7.0\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.
I have use this dependencies : -
dependencies {
implementation "androidx.appcompat:appcompat:$rootProject.appCompatVersion"
// Dependencies for working with Architecture components
// You'll probably have to update the version numbers in build.gradle (Project)
// Room components
implementation "androidx.room:room-runtime:$rootProject.roomVersion"
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
annotationProcessor "androidx.room:room-compiler:$rootProject.roomVersion"
androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
// Lifecycle components
implementation "androidx.lifecycle:lifecycle-viewmodel:$rootProject.lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata:$rootProject.lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-common-java8:$rootProject.lifecycleVersion"
// UI
implementation "androidx.constraintlayout:constraintlayout:$rootProject.constraintLayoutVersion"
implementation "com.google.android.material:material:$rootProject.materialVersion"
// Testing
testImplementation "junit:junit:$rootProject.junitVersion"
androidTestImplementation "androidx.arch.core:core-testing:$rootProject.coreTestingVersion"
androidTestImplementation("androidx.test.espresso:espresso-core:$rootProject.espressoVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation "androidx.test.ext:junit:$rootProject.androidxJunitVersion"
}
Virsion is
ext {
appCompatVersion = '1.3.0'
constraintLayoutVersion = '2.0.4'
coreTestingVersion = '2.1.0'
lifecycleVersion = '2.3.1'
materialVersion = '1.3.0'
roomVersion = '2.3.0'
// testing
junitVersion = '4.13.2'
espressoVersion = '3.1.0'
androidxJunitVersion = '1.1.2'
}

Related

Azure Active Directory's library get "Failed to resolve: com.microsoft.device.display:display-mask:0.3.0" error

Azure Active Directory's library get "Failed to resolve: com.microsoft.device.display:display-mask:0.3.0" error.
Failed to resolve: com.microsoft.device.display:display-mask:0.3.0
build.gradle(Module:app):
dependencies {
//MSAL
implementation 'com.microsoft.identity.client:msal:4.0.5'
implementation 'com.microsoft.identity:common:8.0.3'
implementation 'com.microsoft.device.display:display-mask:0.3.0'
implementation 'com.microsoft.graph:microsoft-graph:5.40.0'
implementation 'com.azure:azure-identity:1.7.0-beta.2'
}
build.gradle(Project)
buildscript {
repositories {
google()
mavenCentral()
mavenLocal()
maven {
url 'https://pkgs.dev.azure.com/MicrosoftDeviceSDK/DuoSDK-Public/_packaging/Duo-SDK-Feed/maven/v1'
}
maven {
name "vsts-maven-adal-android"
url "https://identitydivision.pkgs.visualstudio.com/_packaging/AndroidADAL/maven/v1"
credentials {
username System.getenv("ENV_VSTS_MVN_ANDROIDADAL_USERNAME") != null ? System.getenv("ENV_VSTS_MVN_ANDROIDADAL_USERNAME") : project.findProperty("vstsUsername")
password System.getenv("ENV_VSTS_MVN_ANDROIDADAL_ACCESSTOKEN") != null ? System.getenv("ENV_VSTS_MVN_ANDROIDADAL_ACCESSTOKEN") : project.findProperty("vstsMavenAccessToken")
}
}
jcenter()
}
dependencies {
def nav_version = "2.5.2"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
}
}
After I changed gradle.build(module:app) as follow,
everything works now.
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'com.google.dagger.hilt.android'
id 'androidx.navigation.safeargs.kotlin'
}
android {
namespace
compileSdk 33
defaultConfig {
applicationId
minSdk 26
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug{
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
packagingOptions {
exclude 'META-INF/INDEX.LIST'
exclude 'META-INF/AL2.0'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/io.netty.versions.properties'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.exifinterface:exifinterface:1.3.5'
implementation 'androidx.annotation:annotation:1.5.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
def lifecycle_version = "2.6.0-alpha03"
// ViewModel
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
// LiveData
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
// Lifecycles only (without ViewModel or LiveData)
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
// Saved state module for ViewModel
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version"
// alternately - if using Java8, use the following instead of lifecycle-compiler
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
//navigation
def nav_version = "2.5.3"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
// CameraX core library using the camera2 implementation
def camerax_version = "1.2.0-rc01"
// The following line is optional, as the core library is included indirectly by camera-camera2
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
// If you want to additionally use the CameraX Lifecycle library
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
// If you want to additionally use the CameraX View class
implementation "androidx.camera:camera-view:${camerax_version}"
// If you want to additionally use the CameraX Extensions library
implementation "androidx.camera:camera-extensions:${camerax_version}"
//dagger hilt
implementation 'com.google.dagger:hilt-android:2.44'
kapt 'com.google.dagger:hilt-compiler:2.44'
//Coroutine
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
//Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
//OKHttp3
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.9")
implementation('com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.9')
//Gson
implementation 'com.google.code.gson:gson:2.10'
//MSAL
implementation ("com.microsoft.identity.client:msal:4.0.5") { exclude group: 'com.microsoft.device.display'}
implementation 'com.microsoft.graph:microsoft-graph:5.40.0'
// Uncomment the line below if you are building an android application
implementation 'com.google.guava:guava:30.1.1-android'
// This dependency is only needed if you are using the TokenCrendentialAuthProvider
implementation 'com.azure:azure-identity:1.7.0-beta.2'
// To use CallbackToFutureAdapter
implementation "androidx.concurrent:concurrent-futures:1.1.0"
// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.6.4"
}
kapt {
correctErrorTypes true
}

What should I do to how to fix android gradle error?

I am getting an error while starting the application in android studio.
the error i got;
AGPBI: {"kind":"error","text":"java.lang.IllegalArgumentException","sources":[{}],"tool":"D8"}
Task :app:desugarDebugFileDependencies FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
A failure occurred while executing com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction
Error while dexing.
Build Gradle app;
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id("androidx.navigation.safeargs")
//id 'kotlin-android-extensions'
}
android {
compileSdk 31
defaultConfig {
applicationId "com.maden.kuryeapp_v2"
minSdk 23
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
main.jniLibs.srcDirs = ['libs']
test.jniLibs.srcDirs = ['libs']
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
dataBinding {
enabled = true
}
buildFeatures {
viewBinding = true
}
buildFeatures {
dataBinding true
}
productFlavors { }
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
//Fragment
def nav_version = "2.3.5"
implementation("androidx.navigation:navigation-fragment-ktx:$nav_version")
implementation("androidx.navigation:navigation-ui-ktx:$nav_version")
//Picasso & Glide
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
//Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3")
implementation("androidx.core:core-ktx:1.6.0")
//Others
implementation "de.hdodenhof:circleimageview:3.1.0"
implementation 'com.daimajia.swipelayout:library:1.2.0#aar'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
implementation 'org.bouncycastle:bcpkix-jdk15on:1.69'
implementation("com.google.guava:guava:30.1.1-android")
// RxJava
implementation 'io.reactivex.rxjava3:rxjava:3.0.0'
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'
// Okhttp3 for the POST requests
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
implementation 'org.apache.httpcomponents:httpcore:4.4.10'
implementation 'org.apache.httpcomponents:httpclient:4.5.6'
//Google
implementation 'com.google.android.gms:play-services-maps:17.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.akexorcist:googledirectionlibrary:1.0.4'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
implementation 'com.google.android.gms:play-services-drive:17.0.0'
implementation 'com.google.android.gms:play-services-auth-base:17.1.4'
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'com.google.firebase:firebase-storage:20.0.0'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'com.auth0.android:jwtdecode:2.0.0'
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.3.0'
implementation 'com.google.mlkit:language-id:16.1.1'
implementation 'net.gotev:speech:1.6.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.multidex:multidex:2.0.1'
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: ['*mock*.jar'])
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation project(path: ':cropper')
implementation project(path: ':hbrecorder')
//implementation project(path: ':hbrecorder')
//tckk
implementation files('libs/ekds/tckkapi-operational-basic-2.13.1.jar')
implementation files('libs/ekds/tckkapi-interfaces-2.13.jar')
implementation files('libs/ekds/log4j-1.2.16.jar')
implementation fileTree(dir: 'libs/esya', include: ['*.jar'])
implementation files('libs/pdf/ADDLTV.jar')
implementation 'jp.wasabeef:blurry:2.1.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'org.jmrtd:jmrtd:0.7.18' // nfc kodu
implementation 'net.sf.scuba:scuba-sc-android:0.0.20'
implementation 'edu.ucar:jj2000:5.2'
implementation 'com.github.mhshams:jnbis:1.1.0'
//Camera
implementation 'androidx.camera:camera-camera2:1.1.0-alpha08'
}
Build Gradle module;
buildscript {
ext.kotlin_version = '1.5.20-RC'
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
def nav_version = "2.3.5"
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version")
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

How to solve "Cannot access androidx.activity.contextaware.ContextAware'"?

I'm building a simple application using LiveData and viewmodels but iam getting the following warning messages in my activity surrodning my activity some of the warning
Cannot access 'androidx.activity.contextaware.ContextAware' which is a supertype of 'com.example.movies.presentation.home.MoviesActivity'. Check your module classpath for missing or conflicting dependencies
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// ViewModel
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$life_cycle_version"
// LiveData
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$life_cycle_version"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
kapt "androidx.lifecycle:lifecycle-compiler:$life_cycle_version"
// Hilt
implementation "com.google.dagger:hilt-android:$hilt_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$life_cycle_version"
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
//moshi
implementation("com.squareup.moshi:moshi:$moshi_version")
kapt("com.squareup.moshi:moshi-kotlin-codegen:$moshi_version")
//retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-moshi:$retrofit_version"
implementation("com.squareup.okhttp3:logging-interceptor:$okhttp_version")
//espresso testing
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_core"
androidTestImplementation "androidx.test:runner:$test_runner"
androidTestImplementation "androidx.test:rules:$test_runner"
// Hilt For instrumentation tests
androidTestImplementation "com.google.dagger:hilt-android-testing:$hilt_testing"
androidTestAnnotationProcessor "com.google.dagger:hilt-compiler:$hilt_testing"
//Hilt For local unit tests
testImplementation "com.google.dagger:hilt-android-testing:$hilt_testing"
testAnnotationProcessor "com.google.dagger:hilt-compiler:$hilt_testing"
//mockk for testing
testImplementation "io.mockk:mockk:$mockk_version"
//coroutine testing
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutine_test_version"
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit_5")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit_5")
testImplementation "android.arch.core:core-testing:$arch_version"
my module build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.4.31"
ext.hilt_version = '2.31.2-alpha'
ext.junit = '1.7.1.1'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
classpath "de.mannodermaus.gradle.plugins:android-junit5:$junit"
// 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
}
ext {
life_cycle_version = "2.2.0"
espresso_core = "3.3.0"
test_runner = "1.3.0"
hilt_testing = "2.33-beta"
moshi_version = "1.10.0"
mockk_version = "1.11.0"
retrofit_version = "2.9.0"
okhttp_version = "4.9.0"
coroutine_test_version = "1.4.3"
junit_5 = "5.7.1"
arch_version = "2.2.0"
}
It was resolved when I added the activity jetpack module to the gradle file
def activity_version = "1.2.2"
// Java language implementation
implementation "androidx.activity:activity:$activity_version"
// Kotlin
implementation "androidx.activity:activity-ktx:$activity_version"
I got rid of this error message by upgrading the appCompat library to the latest version from 1.2.0 to 1.3.0-rc01.

How to resolve Duplicate Class error in Android

I am getting Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified-protobuf-javalite-3.11.0.jar (com.google.protobuf:protobuf-javalite:3.11.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1).
I have not seen an answer that clears up my issue. I appreciate any assistance.
apply plugin: 'com.android.application'
apply plugin: 'idea'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: "io.spring.dependency-management"
apply plugin: 'androidx.navigation.safeargs.kotlin'
android {
compileSdkVersion target_sdk_version
buildToolsVersion "29.0.2"
android.buildFeatures.dataBinding
defaultConfig {
applicationId "com.example.app"
minSdkVersion 29
targetSdkVersion target_sdk_version
multiDexEnabled true
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
packagingOptions {
exclude 'META-INF/main.kotlin_module'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable = true
}
debug {
minifyEnabled false
testCoverageEnabled false
}
}
dataBinding {
enabled = true
}
productFlavors {
}
lintOptions {
abortOnError false
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
sourceSets {
main {
main.java.srcDirs += 'src/main/kotlin'
}
}
compileOptions {
sourceCompatibility '1.8'
targetCompatibility '1.8'
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
lintOptions {
abortOnError false
disable 'GradleDependency', 'GoogleAppIndexingWarning'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'org.jetbrains.kotlin' && requested.name == 'kotlin-reflect') {
details.useVersion kotlin_version
}
}
}
}
buildscript {
ext {
gson_version = "2.8.2"
dagger_version = '2.25.2'
rx_version = '2.2.15'
glide_version = "4.7.1"
rx_firebase_version = "1.1.3"
support_version = '28.0.0'
rx_android_version = '2.1.1'
glide_version = '4.11.0'
target_sdk_version = 29
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
def nav_version = "2.3.0"
def lifecycle_version = "2.2.0"
def arch_version = "2.1.0"
def firebase_config = '19.2.0'
implementation ("com.google.firebase:firebase-config:$firebase_config",{
// protobuf-lite that firebase-config and Tink depends on.
exclude group: 'com.google.protobuf',module: 'protobuf-javalite'
exclude group: 'com.google.protobuf',module: 'protobuf-lite'
})
//Base SDK
implementation 'com.amazonaws:aws-android-sdk-appsync:3.0.2'
implementation 'com.amazonaws:aws-android-sdk-core:2.16.13'
//Dagger
implementation 'com.google.dagger:dagger-android:2.28.1'
kapt 'com.google.dagger:dagger-compiler:2.28.1'
kapt 'com.google.dagger:dagger-android-processor:2.28.1'
implementation 'com.google.dagger:dagger-android-support:2.28.1'
//Firebase/Amazon
implementation 'com.amazonaws:aws-android-sdk-iot:2.16.13'
implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.16.13'
implementation "com.firebase:firebase-jobdispatcher:0.8.6"
implementation 'com.firebaseui:firebase-ui-auth:5.0.0'
implementation 'com.google.firebase:firebase-analytics:17.4.4'
implementation 'com.google.firebase:firebase-auth:19.3.2'
implementation 'com.google.firebase:firebase-core:17.4.4'
implementation 'com.google.firebase:firebase-database:19.3.1'
implementation 'com.google.firebase:firebase-firestore:21.5.0'
implementation 'com.google.firebase:firebase-storage:19.1.1'
///Glide
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"
//JETBRAINS
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72'
//Kotlin
implementation 'org.jetbrains.kotlin:kotlin-reflect:1.3.72'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1'
//Lifecycle
// https://mvnrepository.com/artifact/android.arch.lifecycle/common-java8
implementation(group: 'androidx.lifecycle', name: 'lifecycle-common-java8', version: '2.2.0')
// Annotation processor
// alternately - if using Java8, use the following instead of lifecycle-compiler
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version"
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0-alpha05'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0-alpha05'
implementation "androidx.navigation:navigation-dynamic-features-fragment:2.3.0"
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
// optional - ReactiveStreams support for LiveData
implementation "androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version"
// optional - ProcessLifecycleOwner provides a lifecycle for the whole application process
implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version"
// optional - Test helpers for LiveData
testImplementation "androidx.arch.core:core-testing:$arch_version"
kapt 'androidx.databinding:databinding-compiler:4.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.8.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:4.8.0'
//Mini
implementation 'com.github.pabloogc:Mini:1.0.5'
kapt 'com.github.pabloogc.Mini:mini-processor:1.0.5'
annotationProcessor 'com.github.pabloogc.Mini:mini-processor:1.0.5'
// Required for Cognito
implementation('com.amazonaws:aws-android-sdk-cognitoauth:2.16.13#aar') { transitive = true }
//Rx
implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
implementation "io.reactivex.rxjava2:rxandroid:$rx_android_version"
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.5#aar'
//Support
implementation 'androidx.activity:activity-ktx:1.2.0-alpha06'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta8'
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.core:core:1.5.0-alpha01'
implementation 'androidx.fragment:fragment:1.3.0-alpha06'
implementation 'androidx.fragment:fragment-ktx:1.3.0-alpha06'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.google.android.material:material:1.3.0-alpha01'
implementation 'com.google.android.gms:play-services-auth:18.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.android.libraries.places:places:2.3.0'
implementation 'com.google.guava:guava:29.0-jre'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.karumi:dexter:6.2.1'
implementation 'com.pavelsikun:material-seekbar-preference:2.3.0'
implementation 'info.guardianproject.panic:panic:1.0'
implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
//Test
testImplementation 'junit:junit:4.13'
testImplementation 'com.natpryce:hamkrest:1.7.0.0'
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testImplementation 'org.junit.platform:junit-platform-runner:1.6.2'
androidTestImplementation "androidx.navigation:navigation-testing:$nav_version"
androidTestImplementation 'androidx.test:runner:1.3.0-rc01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-rc01'
}
repositories {
google()
mavenCentral()
maven { url "http://dl.bintray.com/jetbrains/spek" }
apply plugin: 'com.google.gms.google-services'
//kotlin annotation processor
apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs.kotlin"
}
kotlin {
experimental {
coroutines "enable"
}
}
...
You need to add an exclusion on one of the imports so it only adds the package once.
Example:
// Now junit will not include hamcrest library. Therefore there will be no
//dependency conflict.
compile ('junit:junit:4.12'){
exclude group: 'org.hamcrest', module:'hamcrest-core'
}

Cannot access androidx.lifecycle.HasDefaultViewModelProviderFactory - Library Module Warning

Getting -> Cannot access androidx.lifecycle.HasDefaultViewModelProviderFactory Warning On Library Module Activity Class.
Gradle Dependencies:
dependencies {
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2'
implementation "com.airbnb.android:epoxy:$rootProject.epoxyVersion"
implementation "com.airbnb.android:epoxy-databinding:$rootProject.epoxyVersion"
annotationProcessor "com.airbnb.android:epoxy-processor:$rootProject.epoxyVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:$rootProject.appCompatVersion"
implementation "se.emilsjolander:StickyScrollViewItems:$rootProject.StickyScrollViewItemsVersion"
implementation "androidx.constraintlayout:constraintlayout:$rootProject.constrainlayout_version"
implementation "com.google.firebase:firebase-analytics:$rootProject.firebase_core_version"
implementation "com.google.firebase:firebase-messaging:$rootProject.firebase_messaging_version"
implementation "com.crashlytics.sdk.android:crashlytics:$rootProject.crashlytics_version"
implementation "com.google.firebase:firebase-analytics:$rootProject.firebase_core_version"
implementation "com.google.firebase:firebase-config:$rootProject.firebase_config"
implementation "com.squareup.retrofit2:retrofit:$rootProject.retrofit_version"
implementation "com.google.code.gson:gson:$rootProject.gson_version"
implementation "com.squareup.okhttp3:okhttp:$rootProject.okhttp_version"
implementation "com.squareup.retrofit2:converter-gson:$rootProject.retrofit_converter_version"
implementation "com.squareup.retrofit2:converter-scalars:$rootProject.retrofit_converter_version"
implementation "com.squareup.okhttp3:logging-interceptor:$rootProject.okhttp_version"
implementation "com.squareup.retrofit2:adapter-rxjava2:$rootProject.retrofit_version"
implementation "com.jakewharton:butterknife:$rootProject.butterknife_version"
annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterknife_version"
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "androidx.cardview:cardview:$rootProject.card_view_version"
implementation "androidx.legacy:legacy-support-v4:$rootProject.legacy_support_version"
implementation "androidx.recyclerview:recyclerview:$rootProject.recyclerview_version"
implementation "com.android.volley:volley:$rootProject.volley_version"
implementation "com.github.bumptech.glide:glide:$rootProject.glide_version"
annotationProcessor "com.github.bumptech.glide:compiler:$rootProject.glide_version"
implementation "com.facebook.shimmer:shimmer:$rootProject.facebook_shimmer_version"
implementation "androidx.gridlayout:gridlayout:$rootProject.grid_layout_version"
implementation "com.github.badoualy:stepper-indicator:$rootProject.stepper_indicator"
implementation "androidx.browser:browser:$rootProject.browser_version"
implementation "com.github.MikeOrtiz:TouchImageView:$rootProject.touch_imageview_version"
implementation "com.orhanobut:logger:$rootProject.orhanobut_logger"
implementation "androidx.multidex:multidex:$rootProject.multidex_version"
implementation "com.google.dagger:dagger:$rootProject.dagger2Version"
annotationProcessor "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"
annotationProcessor "com.google.dagger:dagger-android-processor:$rootProject.dagger2Version"
implementation "com.google.dagger:dagger-android-support:$rootProject.dagger2Version"
implementation "androidx.lifecycle:lifecycle-extensions:$rootProject.lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-common-java8:$rootProject.lifecycleVersion"
implementation "com.ethanhua:skeleton:$rootProject.skeleton_version"
implementation "io.supercharge:shimmerlayout:$rootProject.shimmerlayout_version"
implementation "org.igniterealtime.smack:smack-android-extensions:$rootProject.smack_version"
implementation "org.igniterealtime.smack:smack-tcp:$rootProject.smack_version"
implementation "org.igniterealtime.smack:smack-extensions:$rootProject.smack_version"
implementation "org.igniterealtime.smack:smack-android:$rootProject.smack_version"
implementation "org.igniterealtime.smack:smack-experimental:$rootProject.smack_version"
implementation "com.vanniktech:emoji:$rootProject.emoji_version"
implementation "com.vanniktech:emoji-google:$rootProject.emoji_version"
implementation "com.amulyakhare:com.amulyakhare.textdrawable:$rootProject.text_drawable_version"
implementation "de.hdodenhof:circleimageview:$rootProject.circle_image_view_version"
implementation "org.jsoup:jsoup:$rootProject.jsoup_version"
implementation "com.squareup.picasso:picasso:$rootProject.picasso_version"
implementation "androidx.room:room-runtime:$rootProject.room_version"
annotationProcessor "androidx.room:room-compiler:$rootProject.room_version"
// optional - RxJava support for Room
implementation "androidx.room:room-rxjava2:$rootProject.room_version"
implementation "io.reactivex.rxjava2:rxandroid:$rootProject.rx_android_version"
// Test helpers
implementation "com.github.smart-fun:XmlToJson:$rootProject.xml_to_json_version"
implementation "androidx.navigation:navigation-fragment:$rootProject.navigation_version"
implementation "androidx.navigation:navigation-ui:$rootProject.navigation_version"
implementation "net.opacapp:multiline-collapsingtoolbar:$rootProject.collapsing_toolbar_version"
implementation "androidx.viewpager2:viewpager2:$rootProject.viewpager2_version"
implementation "com.google.android.material:material:$rootProject.material_version"
implementation "androidx.transition:transition:$rootProject.transition_version"
implementation "androidx.paging:paging-runtime:$rootProject.paging_version"
implementation project(":evalyPaymentLibrary")
implementation project(path: ':richlinkpreview')
configurations {
all*.exclude group: 'xpp3', module: 'xpp3'
}
}
Versions
ext{
dagger2Version = '2.16'
lifecycleVersion = '2.2.0'
epoxyVersion = '3.9.0'
appCompatVersion = '1.1.0'
xml_to_json_version = '1.4.5'
room_version = '2.2.5'
rx_android_version = '2.1.1'
circle_image_view_version = '3.1.0'
emoji_version = '0.6.0'
smack_version = '4.3.0'
shimmerlayout_version = '2.1.0'
skeleton_version = '1.1.2'
multidex_version = '2.0.1'
gson_version = '2.8.6'
logger_version = '2.2.0'
touch_imageview_version = '2.2.0'
facebook_core_version = '5.0.0'
finestwebview_version = '1.2.7'
stepper_indicator = '1.0.7'
android_support_version = '28.0.0'
facebook_shimmer_version = '0.5.0'
glide_version = '4.11.0'
volley_version = '1.1.1'
espresso_core_version = '3.0.2'
runner_version = '1.0.2'
butterknife_version = '8.1.0'
loggin_interceptor_version = '3.10.0'
retrofit_converter_version = '2.7.1'
okhttp_version = '4.4.0'
retrofit_version = '2.7.1'
crashlytics_version = '2.10.1'
firebase_messaging_version = '20.1.7'
firebase_core_version = '17.4.4'
firebase_config = '19.1.4'
constrainlayout_version = '1.1.3'
StickyScrollViewItemsVersion = '1.0.0'
card_view_version = '1.0.0'
legacy_support_version = '1.0.0'
recyclerview_version = '1.1.0'
grid_layout_version = '1.0.0'
browser_version = '1.0.0'
orhanobut_logger = '2.2.0'
text_drawable_version = '1.0.1'
jsoup_version = '1.11.3'
picasso_version = '2.71828'
navigation_version = '2.3.0'
collapsing_toolbar_version = '27.1.1'
viewpager2_version = '1.0.0'
material_version = '1.3.0-alpha01'
transition_version = '1.3.1'
paging_version = '2.1.2'
}
Tried Invalidates Caches Android Studio Multiple Time. No Good Luck.
My project is running up-to-date, I am using Android Studio 4.0.
My Project Structure is As Default ->
my_project
-app
-myLibrary
-anotherLibrary

Categories

Resources