Error:Failed to resolve: com.android.support:customtabs:26.0.1
Error:(44, 13) Failed to resolve: com.google.firebase:firebase-auth:11.0.4
build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "pritish.sawant.com.simplypubliccloud"
minSdkVersion 16
targetSdkVersion 25
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 {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// FirebaseUI
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-config:11.0.4'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.16.0'
compile 'com.google.android.gms:play-services-auth:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
build.gradle(project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I am using Firebase,Facebook libraries.I am getting the following errors.I tried everything.Please help me if you know how to resolve this error.I am also receiving the following error
Error:(41, 13) Failed to resolve: com.android.support:design:26.0.1
I tried clicking on Install Repository and sync project,but nothing happens.
Error:Failed to resolve: com.android.support:customtabs:26.0.1
Error:(41, 13) Failed to resolve: com.android.support:design:26.0.1
You should change your buildToolsVersion version .
Don't
buildToolsVersion "25.0.3"
Do
buildToolsVersion "26.0.1"
Then Clean-Rebuild-Run .
Add one more Dependency to your list.
compile 'com.google.firebase:firebase-core:11.0.4'
Then clean and rebuild your project.
Maybe you can try to change the repositories just as the demo instruction--->
buildscript {
repositories {
jcenter()
mavenLocal()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
mavenLocal()
google()
maven { url 'https://maven.fabric.io/public' }
}
}
Related
I Want to add Firestore in app, my android studio version is 2.3.2, but i am unable to see firestore option in Firebase assistant, And when i am adding librar for Firestore:-
compile 'com.google.firebase:firebase-firestore:10.0.1'
it is showing me this error:-
Error:(32, 13) Failed to resolve: com.google.firebase:firebase-firestore:10.0.1
Please help me out with this problem !!
this is my app level build gradel file:-
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "in.anew.trysafeblog"
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'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.5.+'
compile 'com.google.firebase:firebase-storage:10.0.1'
compile 'com.google.firebase:firebase-firestore:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Please help me out !!!
build gradle file:-
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.0.1'
//classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
To solve this, please change the following lines of code:
compile 'com.google.firebase:firebase-storage:10.0.1'
compile 'com.google.firebase:firebase-firestore:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
to
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-firestore:17.0.2'
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
And please also don't forget to add:
classpath 'com.google.gms:google-services:4.0.1'
To your build.gradle file. Please see here more info.
Use
on your app/build.gradle
compile 'com.google.firebase:firebase-firestore:17.0.2'
compile 'com.google.firebase:firebase-storage:16.0.1'
compile 'com.google.firebase:firebase-auth:16.0.2'
on your project/build.gradle
buildscript {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.2.1'
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) { delete rootProject.buildDir }
I have a problem with gradle. it was working fine but all of sudden when I was rebuilding the project it gives me this error:
Error:Failed to resolve: support-vector-drawable
I can't find out what my problem is?
My app.gradle
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.8.1'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.arizeh.arizeh"
minSdkVersion 17
targetSdkVersion 22
multiDexEnabled true
versionCode 29
versionName "3.0.5"
useLibrary 'org.apache.http.legacy'
testInstrumentationRunner
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26+'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-maps:15.0.1'
compile 'com.google.android.gms:play-services-places:15.0.1'
compile 'com.google.android.gms:play-services-location:15.0.1'
compile 'com.google.android.gms:play-services-gcm:15.0.1'
compile 'com.google.android.gms:play-services-base:15.0.1'
compile 'com.google.firebase:firebase-messaging:15.0.2'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.android.support:percent:26.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.shawnlin:number-picker:2.4.2'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support:support-compat:26.1.0'
compile 'com.daimajia.easing:library:2.0#aar'
compile 'com.daimajia.androidanimations:library:2.2#aar'
compile 'com.zarinpal:purchase:0.0.3-beta'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
}
In my case, I've moved the Google repo on the top in the build.gradle config:
allprojects {
repositories {
google() // now here
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
// google() // was here
}
}
Add vectorDrawables.useSupportLibrary = true in defaultConfig
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
If an error still persists then
allprojects {
repositories {
google() // make it first element
jcenter()
maven { url 'https://maven.google.com' }
}
}
I just encountered this error along with some others:
Failed to resolve: support-vector-drawable
Failed to resolve: livedata-core
Failed to resolve: common
Failed to resolve: runtime
Failed to resolve: viewmodel
Failed to resolve: monitor
I'm not using React Native but found the answer on there:
In android/build.gradle move the jcenter() to the bottom:
allprojects {
repositories {
google()
maven {
url 'https://maven.google.com/'
}
jcenter()
}
}
I faced this error on androidx project and solved it with:
1- in Build.gradle (Module file), android{} section add:
vectorDrawables.useSupportLibrary = true
2- in dependencies {} section,
change :
implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
to update version:
implementation 'androidx.vectordrawable:vectordrawable:1.1.0-beta02'
compile again.
I had the same problem. you must change build.gradle to
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
maven { url 'https://maven.google.com' }
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I had the same problem.
Resolved it via raising the version of v7 Support Libraries:
implementation 'com.android.support:appcompat-v7:28.0.0'
i have tried enough and getting the same issue as in screen shot and finally got success.
my code was like this..
so after searching enough i solved it by adding maven in my gradle file..
its solved then..
You should add this to build.gradle(module: app)
implementation 'com.android.support:support-vector-drawable:28.0.0'
I try many but only this decoration help me to sync the Gradle,
Hope this one help yours
repositories {
mavenLocal()
google()
jcenter()
}
And actually add this line to defaultConfig of app module :
vectorDrawables.useSupportLibrary = true
version conflict either by updating the version of the google-services plugin or updating the version of com.google.android.gms to 11.0.4.
i tried this(Conflict with firebase 11.8.0 and google-services plugin 3.1.2) solution but failed
Messages Gradle Build
build.Gradle(Project Level)
build.Gradle(App level)
App level gradle code
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.example.shadow.pakistannetcafe"
minSdkVersion 15
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 'com.android.support.constraint:constraint-layout:1.0.2'
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-auth:9.2.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Project Level Gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Keep all the firebase dependencies same version so use (in app-level gradle )
compile 'com.google.firebase:firebase-auth:11.8.0'
instead of
compile 'com.google.firebase:firebase-auth:9.2.1'
I am trying to add the library into the Kotlin but it is not getting proper install in it.
Following error I am getting while importing the library, please check it
Error: Could not find com.android.tools.build:gradle:2.3.1.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio Preview/gradle/m2repository/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.pom
file:/C:/Program Files/Android/Android Studio Preview/gradle/m2repository/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.jar
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.jar
Required by:
project: slidingmenulib
I am using the following project build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.3-2'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha9'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And my module build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.zargow.kotlin"
minSdkVersion 15
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'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.0.0-beta2'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:recyclerview-v7:26.0.0-beta2'
compile 'com.github.bumptech.glide:glide:3.8.0'
compile 'org.jetbrains.anko:anko-design:0.8.3'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
compile 'com.android.support:cardview-v7:26.0.0-beta2'
compile 'com.android.support:design:26.0.0-beta2'
compile 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.android.support:design:26.0.0-beta2'
}
I am using the library for sliding menu, please check this. I need to import this library into my kotlin project but getting error.
In progect gradle file use
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "http://jzaccone.github.io/SlidingMenu-aar" }
}
}
and in app gradle add
dependencies {
....
compile 'com.jeremyfeinstein.slidingmenu:library:1.3#aar'
}
I need to import firebase-ui for my app but I am getting this error when I sync gradle
Error:Could not find com.google.services.gms:google-services:3.0.0.
Searched in the following locations:
file:/D:/NewAndroid/androidStudios/mew/gradle/m2repository/com/google/services/gms/google-services/3.0.0/google-services-3.0.0.pom
file:/D:/NewAndroid/androidStudios/mew/gradle/m2repository/com/google/services/gms/google-services/3.0.0/google-services-3.0.0.jar
https://jcenter.bintray.com/com/google/services/gms/google-services/3.0.0/google-services-3.0.0.pom
https://jcenter.bintray.com/com/google/services/gms/google-services/3.0.0/google-services-3.0.0.jar
Required by:
project :
I just downloaded android studio so everything is up to date and everything works until I try to import firebase-ui.
build.gradle(Project:ChatApp)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.google.services.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.emilythacker.chatapp"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
//Add library
compile 'com.android.support:design:25.3.1'
compile 'com.firebaseui:firebase-ui:1.2.0'
}
In your project build.gradle file, this:
classpath 'com.google.services.gms:google-services:3.0.0'
should be:
classpath 'com.google.gms:google-services:3.0.0'
To resolve the twitter error, update your project build.gradle:
allprojects {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' } // <= ADD THIS
}
}
It's needed by Firebase Auth UI.