Could not resolve all files for configuration ':app:debugRuntimeClasspath'. error in android studio version dolphin 2021.3.1 - android-studio

My Android Studio Current version Dolphin 2021.3.1 patch 1, in my project I am getting following build error in empty project while adding a fresh dependency. ie.
implementation 'io.github.amrdeveloper:codeview:1.3.7'
getting from here >>> https://amrdeveloper.github.io/CodeView/install/#main-features
I have already checked lots of Solutions related this question but no luck.
build.gradle:project
// 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
}
build.gradle:module
plugins {
id 'com.android.application'
}
android {
namespace 'com.myvpn.myapp'
compileSdk 32
defaultConfig {
applicationId "com.myvpn.myapp"
minSdk 21
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'
//added these two dependencies
implementation 'io.github.amrdeveloper:codeview:1.3.7'
implementation 'com.github.AmrDeveloper:CodeView:1.3.7'
}
Build Output.
enter image description here
i have tried turn off the Toggle Offline Mode .
enter image description here

Related

After updating compileSdk to version 33, part of the attributes in design stopped being displayed

After updating the androidx.appcompat library:appcompat:1.5.1 to version 1.6.0 android studio gave me this error message:
error message
I have updated compileSdk and versionSdk from version 32 to version 33. After that, most of the attributes were no longer displayed in the Design mode for the elements.
attributes before | attributes after
build.gradle (app):
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.gms.google-services'
}
android {
compileSdk 33
defaultConfig {
applicationId "com.gramzin.kilo"
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'
}
buildFeatures {
viewBinding = true
}
}
dependencies {
implementation platform('com.google.firebase:firebase-bom:31.2.0')
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-database-ktx:20.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'androidx.activity:activity-ktx:1.5.1'
}
I tried changing the gradle version to 7.4.2 and the android gradle plugin version to 7.2.2, but it doesn't help.
I updated android studio and gradle to the latest version and everything worked

i am getting error in Gradle of Android Studio

I am developing a music player app since 10 days. Recently, Android Studio asked me to update but after updating there are some gradle and code errors showing.
the error message due to 200 lines i am able to give here is i upload image
I tried all ways to solve but I have no other option so please tell me the solve
Here are the gradle details
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.h3mplayer'
compileSdk 33
defaultConfig {
applicationId "com.example.h3mplayer"
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'
}
buildFeatures{
viewBinding true
}
}
dependencies {
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 'androidx.media:media:1.6.1'
implementation "android.arch.lifecycle:extensions:1.1.1"
dependencies {
implementation 'com.github.bumptech.glide:glide:4.14.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'
}
}
I tried the last gradle version but also showing some error please help me out

Gardle sync error due to dependency being unresolvable

I am currently developing an android app with AR features using the library com.gorisse.thomas.sceneform:sceneform:1.21.0. It was working fine up until now. Whenever I try to sync the project the dependency is not resolvable.
I once had this exact same problem, but a simple computer restart resolved the issue. Now that doesn't work anymore. I tried deleting the .idea and .gradle folders and importing the project instead of opening it.
More details:
The error I get:
Failed to resolve: com.gorisse.thomas.sceneform:sceneform:1.21.0
Show in Project Structure dialog
Show Details
Affected Modules: app
What my build.gradle looks like:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdk 33
packagingOptions {
resources {
pickFirsts += ['META-INF/DEPENDENCIES']
}
}
buildFeatures {
viewBinding true
}
defaultConfig {
applicationId "com.example.rocksterapp"
minSdk 29
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
}
androidResources {
noCompress 'filamat', 'ktx'
}
namespace 'com.example.<appname>'
}
dependencies {
implementation 'com.google.android.filament:filamat-android:1.21.1'
implementation 'com.gorisse.thomas.sceneform:sceneform:1.21.0'
implementation 'androidx.fragment:fragment-ktx:1.5.3'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-ui:2.5.2'
implementation 'androidx.navigation:navigation-fragment:2.5.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Edit:
I created a new project and just simply copied every file from the old one into it. Problem isn't fixed. Now not only one dependency can't be resolved but three. Sceneform is not included in these.

"Inconsistencies in the existing project dependencies found" error when using Navigation from Android Jetpack

This problem started right after I updated my gradle version and gradle plugin, then I just updated android studio to Artic Fox 2020.3.1 and now I have gradle version 7.0.2 and gradle plugin 7.0.0.
I'm fairly new using android jetpack, I've been trying to use navgraphs so when I open navigation/my_navgraph.xml Android Studio tells me to add navigation dependencies but It has this "Inconsistencies in the existing project dependencies found" message that unables me to compile properly:
Message after opening my_navgraph.xml
This is my app level build.gradle:
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdk 30
defaultConfig {
applicationId "com.example.app.prueba"
minSdk 21
targetSdk 30
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 {
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.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
And this is the project level build.graddle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Any ideas?, I think just messed up my gradle configuration or something, I will appreciate your help

How can I solve this error : Data Binding annotation processor version needs to match the Android Gradle Plugin version

I am trying to data bind my project but I am getting this error in my Gradle file I am a beginner so let me know which files you need or what other information do you need more?
Data Binding annotation processor version needs to match the Android Gradle Plugin version. You can remove the kapt dependency androidx.databinding:databinding-compiler:7.1.0-alpha01 and Android Gradle Plugin will inject the right version.
build.gradle (:app)
plugins {
id 'com.android.application'
id 'kotlin-android'
// id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'kotlin-parcelize'
// id "androidx.navigation.safeargs.kotlin"
id 'androidx.navigation.safeargs.kotlin'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.todoappstevdzaskillshare1"
minSdkVersion 26
targetSdkVersion 30
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'
}
dataBinding {
enabled = true
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//DataBinding
kapt 'androidx.databinding:databinding-compiler:7.1.0-alpha01'
// Navigation Component
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
// Room components
implementation "androidx.room:room-runtime:2.3.0"
kapt "androidx.room:room-compiler:2.3.0"
implementation "androidx.room:room-ktx:2.3.0"
androidTestImplementation "androidx.room:room-testing:2.3.0"
// Lifecycle components
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.3.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
}
NOTE: Let me know which more files do you need and I will edit the question.
You need to delete this line of code kapt'androidx.databinding:databinding-compiler:7.1.0-alpha01' and recompile. According to Google's open databinding document, the way to open databinding is:
android {
...
dataBinding {
enabled = true
}
}
I think databinding is already enabled in your gradle. So just delete the dependency and this error shouldn't occur.

Resources