Error when updating google play services GCM - android

I'm attempting to update the play services GCM, by changing the following line:
compile 'com.google.android.gms:play-services-gcm:9.2.1'
to:
compile 'com.google.android.gms:play-services-gcm:12.0.0'
I then get the message "Install repository and sync project". When I do this, I get the dialog "Finding Available SDK Components", and a little while after another message popup:
"Could not find dependency "com.google.android.gms:play-services-gcm:12.0.0"
My full build.gradle file, if it helps, is:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.myapp"
minSdkVersion 18
targetSdkVersion 26
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.4.0'
compile 'com.google.android.gms:play-services-gcm:12.0.0'
compile 'net.danlew:android.joda:2.9.3.1'
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.squareup.okio:okio:1.8.0'
}

Related

Failed to resolved: compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'

apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "org.passitonkentucky.fayetteresources"
minSdkVersion 18
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.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
compile 'com.android.support:multidex:1.0.2'
}
I downloaded Android 3.0.1, before this I had error minimum version 3.0.
When that's resolved, it's now showing me error.
(27,4).
How can I solve this problem?
First you should avoid using "+" in version number its bad practice. add version number will solve your problem.
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'

failed to resolve gradle error

that is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.mabna.hearthurt"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
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:support-v4:23.1.0'
// compile 'com.github.traex.rippleeffect:library:+'
// compile 'com.balysv:material-ripple:1.0.2'
compile 'com.squareup.picasso:picasso:2.5.0'
}
but this error occured:
error(32,13) failed to resolve: com.squareup.picasso:picasso:2.5.1
also for:
compile 'com.github.traex.rippleeffect:library:+'
compile 'com.balysv:material-ripple:1.0.2'
and other external dependencies error occured.
i have sample of com.github.traex.rippleeffect:library:+ and com.squareup.picasso:picasso:2.5.1 and other dependencies compiled with no error.
so what is the problem
At First Remove + calling from Gradle
Do
compile 'com.github.traex.rippleeffect:library:1.3'
compile 'com.android.support:appcompat-v7:23.1.0' // Instead yours
Edit
Call multiDexEnabled true
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
Then Clean-Rebuild-Sync in your Project.
Dependencies is a virtual folder where IDE shows what JAR files the
project depends on.
#Solivan I guess it's packaging bug . Whenever you create a new project then this bugs omitted .

Unable to sync gradle

I get error messages when I try to add recyclerview and cardview dependencies to my build.gradle. Here is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.truewebdev.applytheme"
minSdkVersion 17
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.2.0'
compile 'com.android.support.recyclerview-v7:23.2.0'
compile 'com.android.support.cardview-v7:23.2.0'
}
Here are the error messages:
If I try to install repository, I get the following:
What is wrong here?
Did you download the Android Support Repository from the SDK Manager?
From android docs:
Make sure you have downloaded the Android Support Repository using the SDK Manager.
http://developer.android.com/tools/support-library/setup.html#libs-with-res

Gradle project refresh failed with no error details

I was working on a project and updated the Android Studio to 1.5 beta. Also I installed android sdks 22 and 23 via SDK manager. After restart the Gradle is failing to refresh without giving any error details.
Here is my gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.company.projname"
minSdkVersion 14
targetSdkVersion 22
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:22.0.3'
compile 'com.android.support:cardview-v7:22.0.2'
compile 'com.android.support:design:22.2.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.sothree.slidinguppanel:library:3.2.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.google.code.gson:gson:2.3.1'
}
Whats wrong with this?
Edit: Android Studio Version details
Thanks.

Getting more than one library with package name 'com.facebook'

I am doing Facebook Integration and got the following error :
Error:Execution failed for task ':app:processDebugResources'.
> Error: more than one library with package name 'com.facebook'
You can temporarily disable this error with`android.enforceUniquePackageName=false
However, this is temporary and will be enforced in 1.0`
You can check my build.gradle file is as follows,
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.zaptech.latestfacebookintegration"
minSdkVersion 17
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.0.1'
compile 'com.android.support:design:23.0.1'
compile project(':facebook')
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
}
Whats the problem is ? Please let me know about it.
You have to remove
compile project(':facebook')
from build.gradle

Categories

Resources