ERROR: Failed to resolve: androidx.appcompat:design:1.1.0 - java

when i implementation 'androidx.appcompat:design:1.1.0' code in build gradle(module app)
it says ERROR: Failed to resolve: androidx.appcompat:design:1.1.0
i have try to change the implementation 'androidx.appcompat:appcompat:1.1.0'
in appscompact version it again shows error
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.bottomnavigation"
minSdkVersion 15
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.appcompat:design:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
ERROR: Failed to resolve: androidx.appcompat:design:1.1.0
Show in Project Structure dialog
Affected Modules: app

To you Design Support Library for androidx you need to use
Use this
implementation 'com.google.android.material:material:1.0.0'
Instead of
implementation 'androidx.appcompat:design:1.1.0'

The library androidx.appcompat:design doesn't exist.
Check the artifact mapping:
com.android.support:design -> com.google.android.material:material:1.0.0
You can find here the documentation of the Material components library.

To eliminate error,
Instead of this:
implementation 'androidx.appcompat:design:1.1.0'
Write this:
implementation 'com.google.android.material:material:1.2.1'

Related

I don't know where is my mistake at the appcompat:design:1.1.0

appcompat:design:1.1.0
I don't know where is the mistake. Probably at appcompat:design:1.1.0 but idk what I've done wrong. I am new btw :)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 15
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.appcompat:design:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.google.firebase:firebase-storage:19.1.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
The library androidx.appcompat:design doesn't exist.
Remove this dependency:
implementation 'androidx.appcompat:design:1.1.0'
and add the Material Components Library.
Material Components for Android is a drop-in replacement for Android's Design Support Library.
Add one of these dependencies:
implementation 'com.google.android.material:material:1.0.0' //stable release
implementation 'com.google.android.material:material:1.1.0' //stable release
implementation 'com.google.android.material:material:1.2.0-alpha03' //alpha release

ERROR: Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve androidx.appcompat:appcompat:1.1.0

I am trying to create a project in the android studio. But every time i find the following gradle error
ERROR: Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve androidx.appcompat:appcompat:1.1.0.
Show Details
Affected Modules: app
I have solved the proxy problem and also unchecked the offline work option. Please help me in this regard.
I have the following dependencies.
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.buraqht"
minSdkVersion 21
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'
}

How can I add support for android 4.4 in my android app

I'm developing an app and I need to run also in older versions of android like android 4.4. I searched a lot but I'm still confusing, I tried something like multindexing but didn't worked.
My module file looks like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "al.sqmo"
minSdkVersion 22
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:recyclerview-v7:28.0.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.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.google.code.gson:gson:2.6.1'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
Any help is appreciated!
Set this version in gradle as below
minSdkVersion 19
That will alow to run app in kitkat.
Let me know for more hlep
To support Android 4.4 you have to set minSdkVersion to 19. See the platform release notes
Its pretty simple to do so:
Check this link out
Simply change your minimumsdk to 19.

Error:java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

I'm creating wallpaper app in the android studio with firebase.
I got an error while compiling
Error:java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Error:com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Error:com.android.dex.DexException: Multiple dex files define Landroid/arch/lifecycle/LiveData$1;
i added "multiDexEnabled true" and
"implementation 'com.android.support:multidex:1.0.3'"
and also i clean and rebuild my project
nothing happens
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.jimdo.saifstudios.wallpfeb"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.firebaseui:firebase-ui-database:3.1.2'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-database:11.8.0'
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'
}
apply plugin: 'com.google.gms.google-services'
Take a look at the docs of the firebase-ui.
https://github.com/firebase/FirebaseUI-Android
For the version you are using you have to use com.google.firebase:firebase-database:11.6.2
If you are extending Application in your app. in my case i fixed it by adding MultiDex.install(this); to attachBaseContext(Context context) method.
you can take a look at:
https://developer.android.com/studio/build/multidex.html

Android build gradle failing, Error app:transformClassesWithMultidexlistForDebug'

Error Log
Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
java.io.IOException: Can't write [D:\Android\testapp\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\Code Nemesis.gradle\caches\transforms-1\files-1.1\support-core-ui-27.1.0.aar\5ded4fc43c89c2e4a62253c7f0400fc3\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))
Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.codenemesis.testapp"
multiDexEnabled true
minSdkVersion 18
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'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.android.support:recyclerview-v7:26.+'
implementation 'com.android.support:cardview-v7:26.+'
implementation 'com.firebaseui:firebase-ui-database:0.4.0'
// Photo dependencies
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
implementation 'id.zelory:compressor:2.1.0'
implementation 'com.android.support:support-v4:26.1.0'
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'
}
apply plugin: 'com.google.gms.google-services'
Already tried: cleaning and rebuilding.
What I have found out is gms:play-services:11.8.0 has conflicts with support:appcompat-v7:26.1.0
disabling any one will work.
I suggest using a specific module of play services. You can check the list here
https://developers.google.com/android/guides/setup
Also use com.theartofdev.edmodo:android-image-cropper:2.5.1 as the 2.6.0 uses sdk v27

Categories