/*These are the errors occurring while building the project any help regarding it to resolve it thanks.
Add while building project it take to much time and after downloading these errors are showing */
ERROR: Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve androidx.multidex:multidex:2.0.0.
ERROR: Unable to resolve dependency for ':app#debugAndroidTest/compileClasspath': Could not resolve androidx.multidex:multidex-instrumentation:2.0.0.
ERROR: Unable to resolve dependency for ':app#debugAndroidTest/compileClasspath': Could not resolve androidx.multidex:multidex:2.0.0.
ERROR: Unable to resolve dependency for ':app#debugUnitTest/compileClasspath': Could not resolve androidx.multidex:multidex:2.0.0.
Build.gradle(App)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.sherry.fitnessapp"
minSdkVersion 16
targetSdkVersion 29
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-firestore:21.1.1'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
apply plugin: 'com.google.gms.google-services'
Build.gradle(project level)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/android/android-tools' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.google.gms:google-services:4.3.2'
// 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
}
/* these above are the files of dependencies i just put these and these error are occurring thankful your help and sorry to not and fully details if not described the question properly*/
I just rebuild the project ad these errors resolved, It's fun, And the Internet should also connected... :P
Related
I got the error message
ERROR: Unable to resolve dependency for ':app#debug/compileClasspath':
Could not resolve androidx.appcompat:appcompat:1.1.0. Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for
':app#debugAndroidTest/compileClasspath': Could not resolve
androidx.appcompat:appcompat:1.1.0. Show Details Affected Modules: app
ERROR: Unable to resolve dependency for
':app#debugUnitTest/compileClasspath': Could not resolve
androidx.appcompat:appcompat:1.1.0. Show Details Affected Modules: app
I've unchecked Offline Work but still the same.
This is my build.gradle(project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
// 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
}
And this is my build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.crudmahasiswa"
minSdkVersion 14
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Anyone please help me, i'm new on programming.. Thankyou
I am trying to add firebase push notifications to app. I started with a fresh application with Basic Activity but facing errors
First I got below error during gradle build
Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
Conflict with dependency 'com.android.support:support-annotations' in
project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1)
differ. See https://d.android.com/r/tools/test-apk-dependency-
conflicts.html for details.
then I added dependency in app level build.gradle and issue resolved
implementation 'com.android.support:support-annotations:27.1.1'
then I got some font related errors which was resolved by changing compileSdkVersion 28
from 26 in app gradle build
Then I followed the steps to add firebase to my project. The gradle sync worked properly but when I am trying to Run the app in my connected device its showing
Error:
Execution failed for task
':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
I tried a few solutions from but none of them worked for me.
app level build.gradle
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.rakesh.firecast"
minSdkVersion 22
targetSdkVersion 26
versionCode 1
versionName "1.0"
multi
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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 'com.android.support:support-annotations:27.1.1'
implementation 'com.google.firebase:firebase-core:17.0.0'
}
apply plugin: 'com.google.gms.google-services'
Project level build.gradle
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Please help me figure it out and resolve this issue
I'm trying to use pocketsphinx in my android app and its giving me trouble. I've installed it as outlined here: PocketSphinx on Android, specifically by importing the .aar. Here is my code:
project build.gradle file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:3.2.1'
classpath 'com.android.tools.build:gradle:3.2.1'
//classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
Application build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "kutz.connor.Aware"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
DexOptions {
matchingFallbacks = ['debug', 'release']
}
}
}
dependencies {
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.maps.android:android-maps-utils:0.5+'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.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 'com.google.firebase:firebase-auth:16.0.1'
implementation 'org.tensorflow:tensorflow-lite:+'
implementation project(':aars')
}
apply plugin: 'com.google.gms.google-services'
And the error I get is
ERROR: Unable to resolve dependency for ':Aware#debug/compileClasspath': Could not resolve project :aars.
ERROR: Unable to resolve dependency for ':Aware#debugAndroidTest/compileClasspath': Could not resolve project :aars.
ERROR: Unable to resolve dependency for ':Aware#debugUnitTest/compileClasspath': Could not resolve project :aars.
when I try to build the project. Upon research I've seen that this probably has to do with updating Androdi Studio to 3.0.
Some solutions I have tried:
Adding matchingFallbacks for debug, release in the build.gradle function
Creating a settings.gradle for the project
Any help would be great. I've seen on posts to move all buildtypes to the app gradle as well but I'm unsure of exactly how to do that.
EDIT
Here is the settings.gradle file in the project folder, it has only one line
include ':Aware', ':aars'
I'm getting the following errors when trying to add implementation 'com.android.support:cardview-v7:27.1.1' to my build.gradle (app):
Unable to resolve dependency for ':app#debug/compileClasspath': Could not
resolve com.android.support:cardview-v7:27.1.1.
Unable to resolve dependency for ':app#debugAndroidTest/compileClasspath':
Could not resolve com.android.support:cardview-v7:27.1.1.
Unable to resolve dependency for ':app#debugUnitTest/compileClasspath':
Could not resolve com.android.support:cardview-v7:27.1.1.
Unable to resolve dependency for ':app#release/compileClasspath': Could not
resolve com.android.support:cardview-v7:27.1.1.
Unable to resolve dependency for ':app#releaseUnitTest/compileClasspath':
Could not resolve com.android.support:cardview-v7:27.1.1.
Here is my App gradle:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 27
defaultConfig {
applicationId "afinal.recipe.p.recipe1"
minSdkVersion 22
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-media-compat:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
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 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
}
apply plugin: 'com.google.gms.google-services'
And my Project gradle:
// Top-level build file where you can add configuration options common to
all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they
belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I've already been stuck on this for a while and tried a variety of solutions with no success such as ensuring offline mode isn't checked and changing
apply plugin: 'com.android.application'
to:
apply plugin: 'com.android.library'
and, without success, deleting:
applicationId "afinal.recipe.p.recipe1"
Thanks in advance for any help, would be greatly appreciated.
I'm trying to use databinding for my app but gradle build fails. I'm not able to resolve this. Need your help.
Error i'm facing
Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve com.android.databinding:library:3.1.0.
Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve com.android.databinding:adapters:3.1.0.
Unable to resolve dependency for ':app#debugAndroidTest/compileClasspath': Could not resolve com.android.databinding:library:3.1.0.
app level gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.dell.pitchpls"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '27.0.3'
dataBinding{
enabled = true
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.firebaseui:firebase-ui-database:3.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.okhttp:okhttp:2.5.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'
}
apply plugin: 'com.google.gms.google-services'
Project level gradle file
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}