Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspathenter image description hereenter image description here
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.myapplication'
compileSdk 33
defaultConfig {
applicationId "com.example.myapplication"
minSdk 21
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'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
def nav_version = "2.5.3"
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.8.0")
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'com.github.armcha:SpaceNavigationView:1.6.0'
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation("androidx.room:room-runtime:2.5.0")
annotationProcessor("androidx.room:room-compiler:2.5.0")
}
enter image description here
it may be offline you may need to turn it on
Related
I get duplicate class errors as gradle implementation app's build.gradle file. But I don't know which implementation is actually a duplicate. How can i resolve this? Is there a better way like using bom for the dependencies?
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.bettehomes'
compileSdk 33
defaultConfig {
applicationId "com.example.bettehomes"
minSdk 25
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
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'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
// Import the Compose BOM
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.activity:activity-compose:1.7.0-alpha04'
implementation "androidx.compose.ui:ui-tooling:1.3.3"
implementation "androidx.compose.ui:ui-tooling-preview:1.3.3"
implementation 'androidx.compose.material3:material3:1.1.0-alpha04'
// Android Studio Preview Support
debugImplementation "androidx.compose.ui:ui-tooling:1.3.3"
//testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.4.0-alpha05"
debugImplementation "androidx.compose.ui:ui-test-manifest:1.3.3"
}
I had this issue today and used gradle dependencies to figure out the dependency tree
I figured out that a lib used a latest version of appcompat which used kotlin 1.8.0, a version that has this issue.
In my case the fix was to add the kotlinVersion manually:
buildscript {
ext {
buildToolsVersion = "32.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 32
androidXBrowser = "1.4.0"
kotlinVersion = "1.8.0"
}
...
}
For more information check this issue: https://github.com/proyecto26/react-native-inappbrowser/issues/398
While building gradle I encounter a warning: Failed to resolve: androidx.compose.ui:ui-tooling
and recommends adding Google maven repository but this is already specified in settings.gradle. I tried different versions for compose_ui_version and kotlin compiler extension version. How can I resolve this issue?
buildscript {
ext {
compose_ui_version = "1.4.0-alpha05"
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
}
and app's build.gradle:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.bettehomes'
compileSdk 33
defaultConfig {
applicationId "com.example.bettehomes"
minSdk 25
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
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'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerVersion "1.7.20"
kotlinCompilerExtensionVersion "1.4.0-beta05"
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
def composeBom = platform("androidx.compose.compose-bom:2022.12.00")
implementation composeBom
androidTestImplementation composeBom
implementation 'com.google.maps.android:maps-compose'
implementation 'com.google.android.gms:play-services-maps'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.activity:activity-compose'
implementation "androidx.compose.ui:ui-tooling"
implementation "androidx.compose.ui:ui-tooling-preview"
implementation 'androidx.compose.material3:material3'
// Android Studio Preview Support
debugImplementation "androidx.compose.ui:ui-tooling"
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
debugImplementation "androidx.compose.ui:ui-test-manifest"
}
Have you tried adding the following into the buildscript section inside your project level gradle file?
repositories {
mavenCentral()
}
I was having the same problem.
Eventually I tried to add the version explicitly like this:
implementation "androidx.compose.ui:ui-tooling-preview:1.3.2"
Notice that 1.3.2 is the version imported by the BOM version you are using.
Obviously it was still not working but at least now I got a more descriptive error message.
It turned out I need compileSdkVersion 33 (I was using 31).
Since I don't want to increment yet my compileSdkVersion, I will have to downgrade ui-tooling-preview to explicitly use version 1.1.1
I can see you are already using compileSdkVersion 33, however adding explicitly the version might help you get a more descriptive error message.
ive being trying to write a loggin with google , phone and email activity, but the app is not importing : com.firebase.ui.auth.AuthUI
this is my app build gradle
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.stockmng"
minSdk 22
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
implementation 'com.google.firebase:firebase-auth:21.1.0'
implementation 'com.google.firebase:firebase-firestore:24.4.1'
implementation 'com.google.firebase:firebase-database:20.1.0'
implementation 'com.firebaseui:firebase-ui-auth:6.2.1'
implementation 'com.google.firebase:firebase-core:21.1.1'
implementation 'com.google.android.gms:play-services-auth:20.4.0'
//apply plugin: 'com.android.application'
implementation 'com.github,MrNouri:DynamicSizes:1.0'
}
and my project gradle
buildscript {
repositories{
google()
mavenCentral()
gradlePluginPortal()
maven { url 'https://jitpack.io'}
}
dependencies {
classpath 'com.google.gms:google-services:4.3.14'
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
i tried adding, changing updating the implentations in app build gradle,
i have permission.internet and ACCES_NETWORK_STATE added to the manifest.
a configured the api keys,and oAuth updated,
also adding in google maven and maven central in repository en the project gradel,
nothing works.
I try to use Selenium library, but when compile selenium in gradle the project is not built.
// when I add selenium , I can not build project
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException
My Gradle is:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.cagri.sdkchange"
minSdkVersion 14
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'
}
}
buildToolsVersion '28.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'org.seleniumhq.selenium:selenium-java:3.14.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.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'
}
When I put a library for pdf view in dependencies in android studio 3.1.3 ,It shows the error message "All com.android.support libraries must use the exact same version specification ".What is the way to read pdf in this situation?
build.gradle file has the following code:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.lenovo.myapplication"
minSdkVersion 15
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'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-beta01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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.github.barteksc:android-pdf-viewer:3.1.0-beta.1'
}