Failed to resolve play service v 7.0.0 onwards - android

I am trying to sync Gradle with the following dependencies
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.android.gms:play-services:7.0.0' }
but its giving following error
after clicking on the link provided in the screenshot it opens and say the following
I'm not able to solve this problem.
My Android Repo and all support library is updated.
TIA

Related

Android Studio gradle update error

I am working on geofencing app in Android. If I set the
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-location:9.0.1'
}
it works fine.If I changed it to
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-location:11.0.2'
}
I get following error.
package com.google.android.gms.maps does not exist
package com.google.android.gms.maps.model does not exist
Why? I need to set it to 11.0.2 for integrating it with other app.
Sync Project With Gradle File may help. Just click the button next to AVD Manager or navigate through Tools->Android->Sync Project With Gradle File.
Try to sync your project with gradle file but if gradle sync failed then download the latest version of gradle and specify its path under build.gradle and try to sync again.
you got to install the missing google play services.
Go to settings and update your google play services and google repository to latest version which is 46 means you got to use this version 11.0.46

I am facing following rendering problems in Android Studio when I try to open my project. How can I resolve it?

I am facing following rendering problems in Android Studio when I try to open my project. How can I resolve it?
Seems like your libraries are pretty old
Please add this in gradle.build
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.+'
compile 'com.android.support:design:23.1.1'
}

why gradle attemps to download appcompat again

Why gradle trys to download dependencies again, when it downloaded them in past?
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.androied.support:appcompat-v7:23.0.1'
//compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:cardview-v7:23.0.1'
compile project(':sweetsheet')
compile files('libs/bolts-tasks-1.3.0.jar')
}
the error:
Error:(30, 13) Failed to resolve: com.androied.support:appcompat-v7:23.0.1
Show in File<br>Show in Project Structure dialog
I'm not online all the time. I downloaded the appcompat-v7:
screenshot of downloaded appcompat-v7
You have a typo.
com.androi e d.support:appcompat-v7:23.0.1 instead of
com.android.support:appcompat-v7:23.0.1
You can change gradle settings in the android studio
Go to settings and type gradle then you can tick gradle offline work and the gradle is not going download dependencies every time.

NoClassDefFoundError: com.firebase.ui.auth.google.GoogleAuthProvider

I'm using Android Studio 1.5 and trying to add Firebase UI library to my application.
I've added it to my dependencies.
For some reason I'm getting the NoClassDefFoundError exception.
I've read that I should add Firebase-UI jar to my 'libs' folder, but I can't find it.
Any suggestions?
Most likely your missing the Google Play Services dependency from your app's build.gradle. For reference, this is one of mine:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.firebaseui:firebase-ui:0.3.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
}
FirebaseUI depends on com.google.android.gms:play-services-auth:8.3.0 for its Google authentication. For all dependencies, see this section of the README.

Exoplayer r1.5.2 failed to resolve com.google.android.exoplayer:exoplayer:r1.5.2

I have a problem when trying to compile exoplayer r1.5.2 repository.... There's no issue when I use com.google.android.exoplayer:exoplayer:r1.4.2 instead.
Here's of the compilation code:
And then this error is thrown:
I had this issue as well: I added compile 'com.google.android.exoplayer:exoplayer:r1.5.2' to my app/build.gradle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.google.android.exoplayer:exoplayer:r1.5.2'
}
And tried sync project in Android Studio, but got the error above.
Solution
I got the dependency downloaded by upgrading to gradle 2.6 and invoking gradle from the shell:
$ ./gradlew build
Upgrading Gradle
Edit the distributionUrl line in <project dir>/gradle/wrapper/gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip

Categories

Resources