Build gradle failed for google play services version - android

When I try to execute buid.gradle I get this error on android studio
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 8.3.0.
and this is the module build.gradle file
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.gs.lasarenas"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.google.android.gms:play-services:8.4.0'
}
In this file the play services version is 8.4.0 but I don't know whre I have to update the version from 8.3.0 to 8.4.0

Updated
well try this
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.google.android.gms:play-services:9.8.0'
}
apply plugin: 'com.google.gms.google-services'
Adding 'com.google.gms.google-services' at the end solved it for me
Hope it helps

Do not use jars
Remove this line compile fileTree(include: ['*.jar'], dir: 'libs')
Do not use play-services.
Please choose one like: play-services-analytics
For example:
dependencies {
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
testCompile 'junit:junit:4.12'
}

try this
compile 'com.google.android.gms:play-services-gcm:8.4.0'

Related

Failed to resolve: com.google.android.support.gms:play-services-map:10.2.0

I am trying to use the features from Google to create a google map but when I tried to sync the project I got this error
This is the build.gradle file..
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.chamiya.bustracking"
minSdkVersion 16
targetSdkVersion 24
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(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// can update the Firebase
compile 'com.google.android.gms:play-services:11.4.2'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.support.gms:play-services-map:10.2.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Failed to resolve: com.google.android.support.gms:play-services-map:10.2.0
It happens because it doesn't exist:
Use:
compile 'com.google.android.gms:play-services-maps:x.x.x'
instead of
compile 'com.google.android.support.gms:play-services-map:10.2.0'
In any case in your build.gradle you have to change something:
you have to use the same version for the support firebase libraries and google play services libraries.
For example use the latest v11.8.0
compile 'com.google.android.gms:play-services:11.X.X'
compile 'com.google.firebase:firebase-database:11.x.x'
compile 'com.google.firebase:firebase-auth:11.x.x'
compile 'com.google.android.support.gms:play-services-map:11.x.x'
Update your compileSdkVersion
Use a compatibile version of the firebase-ui library.
Remove the apply plugin: 'com.google.gms.google-services' at the top of the file.

duplicate entry of library gradle causing application not run

I searched alot but not found any solution of my problem, i tried to run my app on any device and i got this error:
it's throwing an error with com.github.bumptech.glide:glide:3.5.2 ,but it's used only single time how the classes of it got duplicate i run this app before with the same dependencies with out any trouble but suddenly this error appear while i run the app.
app.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "info.androidhive.firebase"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.android.support:design:25.1.0'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.crystal:crystalrangeseekbar:1.1.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Browse to your project's "libs" directory and remove redundant "glide.x.x" which is causing the error due to redundancy.
Try putting this line :
enforceUniquePackageName false
after buildtoolVersion in your gradle

How can I resolve this build error when adding facebook sdk

I keep getting the BUILD FAILED in Android studio and I have resolved other similar error before but this one is hard. Basically what i do is adding the quickstart-android-auth to an existing working Android project.
Everything worked until i adding the quickstart-android-auth files and independents.
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library
[com.facebook.android:facebook-android-sdk:4.16.0]
D:\AndroidStudioProjects\Nogget\app\build\intermediates\exploded-aar\com.facebook.android\facebook-android-sdk\4.16.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.facebook" to force usage
And here is my Build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '24.0.2'
dexOptions {
dexInProcess = true
}
defaultConfig {
applicationId "com.port.android"
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
mavenCentral()
}
packagingOptions{
exclude 'META-INF/LICENSE'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:support-compat:24.2.0'
compile 'com.google.android.gms:play-services:9.6.0'
compile 'com.android.support:support-v13:24.2.0'
compile "com.google.firebase:firebase-messaging:9.0.0"
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.google.code.gson:gson:2.4'
compile 'com.android.support:design:24.2.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:percent:24.2.0'
compile 'me.grantland:autofittextview:0.2.+'
compile 'com.google.firebase:firebase-auth:9.2.1'
compile 'com.google.firebase:firebase-messaging:9.2.1'
compile 'com.google.android.gms:play-services-appinvite:9.6.0'
compile 'com.google.firebase:firebase-analytics:9.2.1'
compile 'com.google.firebase:firebase-crash:9.6.0'
compile 'com.google.android.gms:play-services-ads:9.6.0'
compile 'com.github.bmelnychuk:atv:1.2.+'
compile 'com.github.johnkil.print:print:1.2.2'
testCompile 'junit:junit:4.12'
compile 'com.seatgeek:placesautocomplete:0.2-SNAPSHOT'
compile 'com.fasterxml.jackson.core:jackson-core:2.7.2'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.2'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.2'
compile 'com.facebook.android:facebook-android-sdk:4.16.0'
compile('com.twitter.sdk.android:twitter-core:1.6.6#aar') {
transitive = true
}
compile('com.twitter.sdk.android:twitter:1.13.1#aar') {
transitive = true;
}
}
apply plugin: 'com.google.gms.google-services'
As the error says, your minSDK is 14 but the latest FacebookSDK requires mins SDK 15. Increasing your minSDK should resolve your issue
Change your minSdkVersion to 15 instead of 14.
The Facebook library require api 15. So your project can't have a minsdkversion to 14...
Set the minSdk in your build.gradle to 15 as facebook supports from API 15.

Android Studio: Gradle Sync fail with support-v4-24.1.1.jar

I am getting gradle issue .
here is below issue in gradle message, while doing sync in gradle
Our Android Studio version is 2.1.2.
Error:A problem occurred configuring project ':LetMeCall_Store'.
Could not find support-v4.jar (com.android.support:support-v4:24.1.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/24.1.1/support-v4-24.1.1.jar
Below is gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.app.letmecall.store"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:design:24.0.0-beta1'
compile 'com.android.support:support-v4:24.0.0-beta1'
compile 'com.android.support:recyclerview-v7:24.1.1'
compile 'com.android.support:cardview-v7:24.0.0-beta1'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.daimajia.androidanimations:library:1.0.3#aar'
compile "com.google.android.gms:play-services:8.3.0"
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.android.support:multidex:1.0.0'
}
Plz anyone help us to fix that issue
Advance thanks
I upgraded all my Android SDK tools (including "Support Repository"), however, I still got the error
Gradle sync failed: Could not find recyclerview-v7.jar (com.android.support:recyclerview-v7:24.1.1)
I then did the following :
targetSdk 24 (was 23)
buildToolsVersion: "24.0.3" (was 24.0.0)
deleted the folders within /.gradle/caches I have windows and the complete path is C:\Users\USERNAME\.gradle\caches
THEN the project built without error !!
Change this
compile 'com.android.support:design:24.0.0-beta1'
compile 'com.android.support:support-v4:24.0.0-beta1'
compile 'com.android.support:recyclerview-v7:24.1.1'
compile 'com.android.support:cardview-v7:24.0.0-beta1'
to this
compile 'com.android.support:design:24.1.1'
compile 'com.android.support:support-v4:24.1.1'
compile 'com.android.support:recyclerview-v7:24.1.1'
compile 'com.android.support:cardview-v7:24.1.1'
you have to use same version.
Replace with these
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.stackdemo"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.daimajia.androidanimations:library:1.0.3#aar'
compile "com.google.android.gms:play-services:8.3.0"
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.android.support:multidex:1.0.0'
}
I have the same issue and once i update Build tool version and android studio. Issue is resolved. Defiantly it is due to older build tool version.
I had this issue with a sample project from Android Developers. I updated all of the libraries in. the gradle file to latest versions then cleaned & rebuilt the project. All is working fine now.
Probably a good idea to make sure all of your sdk's are up to date too

java.lang.NoClassDefFoundError: com.amazonaws.mobileconnectors.apigateway.ApiResponse

I made a few changes to my android application, and now I'm getting this. I'm thinking it might be caused by updating the autogenerated ApiGateway SDK that I'm using in my app. But maybe it's something else? I'm not even sure where to start debugging.
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '24.0.2'
defaultConfig {
applicationId "com.johndoe.supercoolsoftware"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// compile fileTree(include: ['*.jar'], dir: 'app/libs')
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.google.android.gms:play-services-auth:9.2.0'
compile 'com.facebook.android:facebook-android-sdk:4.14.1'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:design:23.0.0'
compile 'com.amazonaws:aws-android-sdk-core:2.2.22'
compile 'com.amazonaws:aws-android-sdk-s3:2.2.22'
compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.2.22'
compile 'com.amazonaws:aws-android-sdk-cognito:2.2.22'
compile 'com.amazonaws:aws-android-sdk-apigateway-core:2.2.22'
compile 'com.google.code.gson:gson:2.2.4'
//used for API Gateway SDK generated classes
compile files('libs/Api-alpha-0.51.jar') #<- autogenerated SDK
}
apply plugin: 'com.google.gms.google-services'
Okay I figured it out. AWS just updated their Android core. So now when you build it's using a newer version (v2.3.2 now) where the old one was v2.22.2. Once I updated my android application to use v2.3.2 by changing my gradel file, everything worked.
compile 'com.amazonaws:aws-android-sdk-core:2.3.2'
compile 'com.amazonaws:aws-android-sdk-s3:2.3.2'
compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.3.2'
compile 'com.amazonaws:aws-android-sdk-cognito:2.3.2'
compile 'com.amazonaws:aws-android-sdk-apigateway-core:2.3.2'

Categories

Resources