Unable to resolve dependency for - android

I am going to do a google map Application using the Android Studio, but I found I can not implement the ''com.google.android.libraries.places:places:2.6.0'', there are 3 warnings:
Unable to resolve dependency for ':app#debugAndroidTest/compile Classpath': Could not resolve
com.google.android.libraries.places:places:2.4.0.Show Details Affected Modules: app
Unable to resolve dependency for ':app#debugUnitTest/compileClasspath': Could not resolve
com.google.android.libraries.places:places:2.4.0.Show Details
Affected Modules: app
Unable to resolve dependency for :app#debug/compileClasspath': Could not resolve
com.google.android.libraries.places:places:2.4.0. Show Details Affected Modules: app
Here is my app build.Gradle:
plugins {
id 'com.android.application'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.lostandfoundapplication2"
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
}
buildFeatures {
viewBinding true
}}
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.libraries.places:places:2.6.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
'''
and here is my root gradle:
plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.0' apply
false}
task clean(type: Delete) {
delete rootProject.buildDir
}
'''
I REALLY NEED HELP WITH IT, PLLLLLLS

Related

Kotlin error: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1

Seems this has been asked a few times, but the questions with solutions are seemingly outdated.
Here are my build.gradle files... any idea what I'm meant to be changing? (Complete Kotlin novice here, in case that wasn't obvious)
Build.gradle (Module)
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.testapp"
minSdk 24
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
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.5.0'
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-fragment-ktx:2.5.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
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.1.0' apply false
id 'com.android.library' version '7.1.0' apply false
id 'org.jetbrains.kotlin.android' version '1.5.30' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Any help would be greatly appreciated

Could not find com.google.firebase-database:10.2.0:

Hello I am trying to connect with FireBase with my Android Project
I am currently struggling with this error
"Could not find com.google.firebase-database:10.2.0:."
Here is my build.gradle(app)
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.cafesample"
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.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.firebase:firebase-core:10.2.0'
implementation 'com.google.firebase-database:10.2.0'
implementation 'info.hoang8f:fbutton:1.0.5'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
}
apply plugin: 'com.google.gms.google-services'
I have seen solutions where I update my google services from SDK Tools
But still have the issue when I try to run my Android Project
Here is my other Build.Gradle(AppName)
plugins {
id 'com.android.application' version '7.2.0' apply false
id 'com.android.library' version '7.2.0' apply false
id 'com.google.gms.google-services' version '4.3.0' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Perhaps, you're implementing it wrong. Change it to
implementation 'com.google.firebase:firebase-database:20.0.5'

Could not resolve all files for configuration ':app:debugCompileClasspath'. using Android Studio Chipmunk | 2021.2.1

I have recorded a video using mobile camera but now i want to trim that video using a library, after adding the below dependency for trimming feature.
implementation 'com.github.a914-gowtham:android-video-trimmer:1.7.0'
i am getting this error:
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugCompileClasspath'.
Here is my app level build.gradle code:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.techease.videome"
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
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
//trimmer
implementation 'com.github.a914-gowtham:android-video-trimmer:1.7.0'
}
And here is the project level build.gradle:
// Top-level build file where you can add configuration options common to all sub-
projects/modules.
buildscript {
repositories {
maven { url 'https://jitpack.io' }
}
}
plugins {
id 'com.android.application' version '7.2.0' apply false
id 'com.android.library' version '7.2.0' apply false
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Anyone having idea what i am missing here?
In the android studio from "File" menu call "Invalidate caches..."
After loading android studio build the project again. Every thing will be correct.

meow bottom navigation bar is not recogonised by android studio even after entering dependencies?

it giving me error <meow.meowbottomnavigation.MeowBottomNavigation
/>
in red, saying missing class even after entering these dependecies.
build.gradel(project)
buildscript {
repositories {
jcenter()
}
}
plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}
build.gradel(app)
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.meowbotm"
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
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.etebarian:meow-bottom-navigation:1.2.0'
}
i have also added following lines in gradel properties
android.useAndroidX=true
android.enableJetifier=true
i don't know what problem is, in YT and on websites its shows these dependecies are sufficent and meowbottom bar working.
You have to use this tag in your xml file to implement, then it will work. AS you are using 1.2.0 version.
<com.etebarian.meowbottomnavigation.MeowBottomNavigation
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/btm_nav"
android:layout_gravity="bottom"
app:mbn_backgroundBottomColor="#color/purple_200"
app:mbn_circleColor="#color/white"
app:mbn_selectedIconColor="#color/purple_200"
app:mbn_defaultIconColor="#color/white"/>

Failed to resolve:... Affected module: app

I keep getting the error "Failed to resolve: :unspecified: Affected Modules: app" whenever I sync my gradle. This error is not descriptive and hence hard to figure out what's the exact cause for this.
App build.gradle:
plugins {
id 'com.android.application'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.firstapp.attendance_system"
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.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'org.naishadhparmar.zcustomcalendar:zcustomcalendar:1.0.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Project build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I am using Android Studio 2021 on Windows 10 PC

Categories

Resources