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'
}
Related
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
}
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
}
while the project is syncing i get the error below at the line 18 resVlaue("") :
A problem occurred evaluating project ':app'.
Parameter specified as non-null is null: method com.android.build.gradle.internal.dsl.BaseFlavor.resValue, parameter value
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs"
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def fbApiScheme = properties.getProperty('fbApiScheme')
def fbApiKey = properties.getProperty('fbApiKey')
android {
lintOptions {
baseline file("lint-baseline.xml")
}
compileSdkVersion rootProject.ext.compileSdk
defaultConfig {
resValue("string", "fbApiKey", fbApiKey)
resValue("string", "fbApiScheme", fbApiScheme)
vectorDrawables.useSupportLibrary = true
applicationId "org.aossie.agoraandroid"
minSdkVersion rootProject.ext.minSdk
targetSdkVersion targetSdk
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
buildFeatures {
dataBinding = true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test:runner:$testRunnerVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVersion"
// Lifecycle components
implementation "androidx.lifecycle:lifecycle-extensions:$archLifecycleVersion"
kapt "androidx.lifecycle:lifecycle-compiler:2.3.1"
//Design Support Library
implementation "com.google.android.material:material:$materialDesignVersion"
//Library for CardView
implementation "androidx.cardview:cardview:$cardViewVersion"
//Retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-scalars:$retrofitConverterScalarsVersion"
//GSON and GSON converter
implementation "com.squareup.retrofit2:converter-gson:$retrofitConverterGsonVersion"
implementation "com.google.code.gson:gson:$gsonVersion"
//Navigation Architecture Dependencies
implementation "androidx.navigation:navigation-fragment-ktx:$navFragmentVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navUiVersion"
//Shimmer
implementation "com.facebook.shimmer:shimmer:$facebookShimmerVersion"
//Facebook Login
implementation "com.facebook.android:facebook-login:$facebookLoginVersion"
implementation 'com.facebook.android:facebook-android-sdk:9.1.0'
//Pie Chart
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0"
//MockWebServer and Roboelectric
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation "com.squareup.okhttp3:mockwebserver:$mockWebServerVersion"
// Mockito
testImplementation "org.mockito:mockito-core:$mockitoCoreVersion"
testImplementation 'org.json:json:20210307'
//kotlin deps
implementation "androidx.core:core-ktx:1.3.2"
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1' //TODO
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.31'
//dagger
implementation "com.google.dagger:dagger:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
//Shared Prefs
implementation "androidx.preference:preference-ktx:$prefsVersion"
// room
implementation "androidx.room:room-runtime:$roomVersion"
kapt "androidx.room:room-compiler:$roomVersion"
implementation "androidx.room:room-ktx:$roomVersion"
// coroutine
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3-native-mt'
//horizontal calendar
implementation "devs.mulham.horizontalcalendar:horizontalcalendar:$calendarVersion"
//day view lib
implementation "com.linkedin.android.tachyon:tachyon:$tachyonVersion"
//picasso
implementation "com.squareup.picasso:picasso:$picassoVersion"
//timber
implementation "com.jakewharton.timber:timber:$timberVersion"
//httpLoggingInterceptor
implementation "com.squareup.okhttp3:logging-interceptor:$httpLoggingInterceptor"
//chucker
debugImplementation "com.github.chuckerteam.chucker:library:$chuckerVersion"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:$chuckerVersion"
//leakcanary
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanaryVersion"
}
repositories {
mavenCentral()
}
Could you help me to eliminate that DSL alert since as a result of this it does not allow me to link with firebase, I already tried the other groups and it does not work for me or maybe I do not know where to accommodate it
example
android {
buildFeatures {
dataBinding = true
// for view binding:
// viewBinding = true
}
}
I'm going crazy I don't know how to fix it
this is mi gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.app.womba"
minSdkVersion 27
targetSdkVersion 29
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
dataBinding {
enabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.material:material:1.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.9.1"
// Multidex
implementation 'androidx.multidex:multidex:2.0.1'
// View Model
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
//initUI
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
/// glide
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
/// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
/// okhttp3
implementation 'com.squareup.okhttp3:logging-interceptor:4.4.0'
/// CountryCodePicker
implementation 'com.github.inpossoft:CountryCodePickerProject:2.0.0'
//image picker
implementation 'com.github.maayyaannkk:ImagePicker:1.0.4'
implementation 'com.soundcloud.android:android-crop:1.0.1#aar'
// facebook
implementation 'com.facebook.android:facebook-login:5.12.1'
//validations
implementation "com.wajahatkarim3.easyvalidation:easyvalidation-core:1.0.1"
// crashlytics
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-core:17.2.1'
// push notification
implementation 'com.google.firebase:firebase-messaging:20.1.0'
// app permission
implementation 'com.afollestad:assent:2.3.1'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'de.hdodenhof:circleimageview:3.0.1'
implementation 'com.nex3z:flow-layout:1.3.0'
// Room
implementation 'androidx.room:room-runtime:2.2.3'
annotationProcessor 'androidx.room:room-compiler:2.2.3'
kapt 'androidx.room:room-compiler:2.2.3'
// socket
// implementation('io.socket:socket.io-client:0.8.3') {
// exclude group: 'org.json', module: 'json'
// }
implementation 'com.github.nkzawa:socket.io-client:0.6.0'
// double handel seekbar
implementation 'com.crystal:crystalrangeseekbar:1.1.3'
implementation 'com.wang.avi:library:2.1.3'
implementation('com.github.ganfra:material-spinner:2.0.0') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
//This is binah.ai sdk dependency
implementation project(path: ':bnhhrlib')
implementation 'com.jjoe64:graphview:4.2.2'
implementation files('libs/vidyoclient.jar')
implementation 'com.applandeo:material-calendar-view:1.4.0'
/**Stripe Payment Gateway*/
implementation 'com.stripe:stripe-android:12.1.0'
implementation 'com.karumi:dexter:4.2.0'
implementation 'io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:3.1.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
// app permission
implementation 'com.afollestad:assent:2.3.1'
}
apply plugin: 'com.google.gms.google-services'
In advance thanks for the help
You'll have to replace
dataBinding {
enabled = true
}
with the recommended process
buildFeatures {
dataBinding = true
}
My android studio get me bellow error, what can I do?
Failed to resolve: play-services-base
Here is my gradle:
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
//apply plugin: 'com.jakewharton.butterknife'
repositories {
maven { url 'https://maven.google.com' }
}
def taskRequests = getGradle().getStartParameter().getTaskRequests().toString()
def isPlay = !(taskRequests.contains("Foss") || taskRequests.contains("foss"))
apply plugin: 'com.android.application'
if (isPlay) {
apply plugin: 'io.fabric'
}
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: "com.github.ben-manes.versions"
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
defaultConfig {
manifestPlaceholders = [onesignal_app_id : "xxxxx",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "111"]
applicationId "chat.almostafa.android"
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode 10
versionName "1.9"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
def buildTime = new GregorianCalendar().format("MM-dd-yyyy' 'h:mm:ss a z")
buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
signingConfigs {
release {
storeFile project.rootProject.file('PortalAlmostafaChat.jks').getCanonicalFile()
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("KEY_PASSWORD")
}
debug {
storeFile project.rootProject.file('debug.keystore').getCanonicalFile()
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
}
buildTypes {
release {
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
buildConfigField "String", "REQUIRED_SERVER_VERSION", '"0.62.0"'
buildConfigField "String", "RECOMMENDED_SERVER_VERSION", '"0.64.2"'
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
buildConfigField "String", "REQUIRED_SERVER_VERSION", '"0.62.0"'
buildConfigField "String", "RECOMMENDED_SERVER_VERSION", '"0.64.2"'
signingConfig signingConfigs.debug
applicationIdSuffix ".dev"
}
}
flavorDimensions "type"
productFlavors {
// includes proprietary libs
play {
dimension "type"
}
// only foss
foss {
dimension "type"
}
}
packagingOptions {
exclude 'META-INF/core.kotlin_module'
exclude 'META-INF/main.kotlin_module'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//region MOU
implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha2'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'com.netflix.rxjava:rxjava-android:0.20.3'
implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
implementation 'com.joanzapata.iconify:android-iconify-material:2.2.2'
implementation 'com.joanzapata.iconify:android-iconify-material-community:2.2.2'
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
implementation 'com.onesignal:OneSignal:3.+#aar'
implementation 'com.google.firebase:firebase-messaging:17.3.0'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
implementation 'org.jsoup:jsoup:1.10.1'
implementation 'com.mindorks.android:prdownloader:0.4.0'
// //Android-FileBrowser-FilePicker
// implementation 'com.adityak:browsemyfiles:1.7'
//Android-FileBrowser-FilePicker
implementation 'com.github.jaiselrahman:FilePicker:1.1.1'
implementation 'com.jakewharton:butterknife:9.0.0-rc3'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc3'
kapt 'com.jakewharton:butterknife-compiler:9.0.0-rc3'
//Architect Component
// ViewModel and LiveData
implementation "android.arch.lifecycle:extensions:1.1.1"
// alternatively, just ViewModel
implementation "android.arch.lifecycle:viewmodel:1.1.1"
// alternatively, just LiveData
implementation "android.arch.lifecycle:livedata:1.1.1"
kapt "android.arch.lifecycle:compiler:1.1.1"
// Room (use 1.1.0-alpha2 for latest alpha)
implementation "android.arch.persistence.room:runtime:1.1.1"
kapt "android.arch.persistence.room:compiler:1.1.1"
//DNS
implementation 'org.pcap4j:pcap4j-core:1.7.3'
implementation 'org.pcap4j:pcap4j-packetfactory-static:1.7.3'
implementation 'org.minidns:minidns-client:0.3.0'
//endregion
implementation project(':player')
implementation project(':emoji')
implementation project(':draw')
implementation project(':util')
implementation project(':core')
implementation project(':suggestions')
implementation libraries.kotlin
implementation libraries.coroutines
implementation libraries.coroutinesAndroid
implementation libraries.appCompat
implementation libraries.recyclerview
implementation libraries.constraintlayout
implementation libraries.cardview
implementation libraries.browser
implementation libraries.androidKtx
implementation libraries.fragmentsKtx
implementation libraries.dagger
implementation libraries.daggerSupport
kapt libraries.daggerProcessor
kapt libraries.daggerAndroidApt
implementation libraries.flexbox
implementation libraries.material
implementation libraries.room
kapt libraries.roomProcessor
implementation libraries.lifecycleExtensions
kapt libraries.lifecycleCompiler
implementation libraries.viewmodelKtx
implementation libraries.workmanager
implementation libraries.rxKotlin
implementation libraries.rxAndroid
implementation libraries.moshi
implementation libraries.okhttp
implementation libraries.okhttpLogger
implementation libraries.timber
implementation libraries.threeTenABP
implementation libraries.fresco
api libraries.frescoOkHttp
implementation libraries.frescoAnimatedGif
implementation libraries.frescoWebP
implementation libraries.frescoAnimatedWebP
implementation libraries.glide
kapt libraries.kotshiCompiler
implementation libraries.kotshiApi
implementation libraries.frescoImageViewer
implementation libraries.markwon
implementation libraries.aVLoadingIndicatorView
implementation libraries.livedataKtx
implementation 'com.google.code.findbugs:jsr305:3.0.2'
// Proprietary libraries
playImplementation libraries.fcm
playImplementation libraries.firebaseAnalytics
playImplementation libraries.playServicesAuth
playImplementation('com.crashlytics.sdk.android:crashlytics:2.9.5#aar') { transitive = true }
playImplementation('com.crashlytics.sdk.android:answers:1.4.3#aar') { transitive = true }
testImplementation libraries.junit
testImplementation libraries.truth
androidTestImplementation libraries.espressoCore
androidTestImplementation libraries.espressoIntents
}
kotlin {
experimental {
coroutines "enable"
}
}
androidExtensions {
experimental = true
}
// FIXME - build and install the sdk into the app/libs directory
// We were having some issues with the kapt generated files from the sdk when importing as a module
def sdk_location = project.properties['sdk_location'] ?: ""
task compileSdk(type: Exec) {
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine 'cmd', '/c', 'build-sdk.sh', sdk_location
} else {
commandLine './build-sdk.sh', sdk_location
}
}
preBuild.dependsOn compileSdk
if (isPlay) {
apply plugin: 'com.google.gms.google-services'
}
This the updated gradle libraries for today (09/JAN/19), use them (only libraries you need):
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.google.firebase:firebase-firestore:17.1.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-config:16.1.2'
implementation 'com.google.firebase:firebase-invites:16.0.6'
implementation 'com.google.firebase:firebase-ads:17.1.2'
implementation 'com.google.firebase:firebase-appindexing:17.1.0'
implementation 'com.google.firebase:firebase-perf:16.2.3'
implementation 'com.google.firebase:firebase-functions:16.1.3'
implementation 'com.google.firebase:firebase-ml-vision:18.0.2'
implementation 'com.google.firebase:firebase-ml-model-interpreter:16.2.4'
Resolved my problem. I updated to:
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'