Gradle build tool cannot find play-services-tasks.aar? Why? - android

Today suddenly, I got an error when I tried to run my app in Android studio.
It is:
Error: Could not find play-services-tasks.aar (com.google.android.gms:play-services-tasks:15.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-tasks/15.0.1/play-services-tasks-15.0.1.aar
I didn't change anything in the gradle file but it appeared suddenly. My previous build executed successfully some minutes ago.
Why it can't find play-services-tasks.aar which is the part of com.google.android.gms:play-services-tasks:15.0.1
Steps taken:
I checked whether I included all repositories in the gradle files and all are correct so far.
Why does this error occur all of a sudden?
I also copied this link https://jcenter.bintray.com/com/google/android/gms/play-services-tasks/15.0.1/play-services-tasks-15.0.1.aar into the browser but it's working fine, that is, I got "File Download" dialog.
My Gradle Files
App level
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "mekanic24assistantapplication.heba.mekanic24.com.mekanic24assistantapplication"
minSdkVersion 14
targetSdkVersion 26
versionCode 13
versionName "2.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
// err Android Gradle Duplicate files copied in APK META-INF/license.txt
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:26+'
force 'com.android.support:support-annotations:26+'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
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'
})
// compile 'com.android.support:appcompat-v7:26.3.1'
compile 'com.android.support:appcompat-v7:26+'
compile 'com.android.support:design:26+'
compile 'com.android.support:recyclerview-v7:26+'
compile 'com.android.support:cardview-v7:26+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
androidTestCompile 'com.android.support:support-annotations:26+'
testCompile 'junit:junit:4.12'
// compile 'com.android.support:appcompat-v7:26.3.1'
compile 'com.github.markushi:circlebutton:1.1'
// compile 'com.android.support:design:26.3.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.android.gms:play-services-base:15.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.firebase:firebase-client-android:2.5.2'
compile 'com.google.firebase:firebase-core:15.0.2'
compile 'com.google.firebase:firebase-messaging:15.0.2'
compile 'com.google.firebase:firebase-database:15.0.0'
compile 'com.wang.avi:library:2.1.3'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'android.lib.recaptcha:reCAPTCHA:2.0.0'
compile 'com.google.android.gms:play-services-safetynet:15.0.1'
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.squareup.picasso:picasso:2.5.2'
testCompile 'junit:junit:4.12'
compile 'com.anjlab.android.iab.v3:library:1.0.38'
compile files('libs/mail.jar')
compile files('libs/additionnal.jar')
compile files('libs/activation.jar')
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.yarolegovich:lovely-dialog:1.1.0'
compile 'com.mobsandgeeks:android-saripaar:2.0.3'
compile 'com.github.stfalcon:smsverifycatcher:0.3.1'
compile 'ch.acra:acra:4.9.0'
//TODO: Apache 2.0 license https://github.com/ACRA/acra
compile 'com.google.android.gms:play-services-ads:15.0.1'
compile 'com.github.luongvo:GmailBackground:2.0.2'
}
apply plugin: 'com.google.gms.google-services'
Project Level
buildscript {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
maven {
url "https://dl.bintray.com/android/android-tools"
}
maven { url "https://jitpack.io" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.google.gms:google-services:3.2.0'
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
maven {
url "https://dl.bintray.com/android/android-tools"
}
maven { url "https://jitpack.io" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

After doing the following changes the error disappeared:
Removed maven { url 'https://maven.google.com' } from repositories in app build.gradle.
Added maven { url 'https://maven.google.com' } as first entry in allprojects/repositories in top level build.gradle
Changed all play-services and firebase dependencies to the latest versions
Changed version of google-services plugin to classpath 'com.google.gms:google-services:4.0.1'

The fix is to put google url above jcenter() in your repository list in gradle.
Here's the issue: https://issuetracker.google.com/issues/80362794

in my case:
allprojects {
repositories {
google()
jcenter()
}
}
solves my problems
in my old configuration was only "jcenter()"
first line jcenter(), second line google() doesn't work

For my case I removed mavenCentral() from app gradle repositores and moved maven { url 'https://maven.google.com' } to the first positionin in project gradle as Ivan Rigamonti suggested above. No Firebase dependecies update needed.
(this should be a comment, but I don't have enough reputation)

I am getting the same issue today. It was working fine until now. Maybe it's a temporary Google servers issue.
The solution that works for me is using an older version of google-play-services:
implementation 'com.google.android.gms:play-services-maps:11.4.2'

Change
compile 'com.google.android.gms:play-services-safetynet:15.0.1'
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'
to
compile 'com.google.android.gms:play-services-safetynet:16.0.0'
compile 'com.google.android.gms:play-services-maps:16.0.0'
compile 'com.google.android.gms:play-services-places:16.0.0'
compile 'com.google.android.gms:play-services-location:16.0.0'
Is my case, it works!

Could it be that google changed the naming conventions of the packages on the server side?
I'm experiencing the same sort of issue with a different play services package just now.
Namely play-services-basement.aar...
I'm thinking that
Could not find play-services-tasks.aar
Means it's looking for the file named as play-services-tasks.aar
While on the server this file is called:
play-services-tasks-15.0.1.aar
I'm thinking this is either a gradle issue where files aren't named correctly or a server side issue where files aren't named correctly.
Please correct me if I'm mistaken here.
EDIT: this issue should be reported to jcenter.bintray.com since they are the ones being at fault here at their server side. Switching to the Maven repository mentioned by Ivan Rigamonti could be a solution but I'm uncertain how ionic apps deal with switching repositories.
EDIT2: Switching to the maven repository does indeed work for ionic. All I had to do for ionic was to alter build.gradle by putting jcenter() underneath maven() inside of the buildscript repositories and allprojects repositories.

if you Guys Getting Error Like build.gradle error , Failed to resolve: common like this build.gradle error , Failed to resolve: common
then put below line in allprojects scope in repositories scope in Project build.gradle
line :
maven { url 'https://maven.google.com' }
jcenter()
google()
example
allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
google()
}

Related

In my project it failed to add "firebase" to android studio

I was adding firebase to my project as documented in the official website.
In the 4th step it says to add compile 'com.google.firebase:firebase-core:16.0.0'.
But trying to synch gradle I would get errors:
and by trying to download them (install repository abd synch project) I would get this error:
here is my gradle dependencies:
dependencies {
implementation 'com.google.firebase:firebase-core:16.0.1'
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.google.android.gms:play-services-gcm:15.0.1'
compile 'com.google.android.gms:play-services-location:15.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.google.firebase:firebase-auth:11.6.2'
compile 'com.google.android.gms:play-services-auth:15.0.1'
compile 'com.google.code.gson:gson:2.7'
compile('io.socket:socket.io-client:1.0.0') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
compile 'com.onesignal:OneSignal:3.6.5'
compile 'com.android.volley:volley:1.0.0'
testCompile 'junit:junit:4.12'
}
this answer did not work either:
this
update
My project-level gradle:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:4.0.1'
// 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' }
mavenCentral()
google()
}
}
Upgrade the following:
implementation 'com.google.firebase:firebase-auth:11.6.2'
into this:
implementation 'com.google.firebase:firebase-auth:16.0.2'
Add google service plugin version 4.0.1 and google() repo in top level gradle file:
buildscript {
// ...
dependencies {
// ...
classpath 'com.google.gms:google-services:4.0.1' // google-services plugin
}
}
allprojects {
// ...
repositories {
// ...
google() // Google's Maven repository
}
}
Use same versions of firebase services to avoid conflicts.
Refer https://firebase.google.com/docs/android/setup
To solve your problem.
Before you proceed, clean and rebuild your project.
Then at app/build.gradle,
add apply plugin: 'com.google.gms.google-services'
like the code snippet down below.
android {
// ...
}
dependencies {
// ...
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
And make sure all the library used are as here.
Hope it helps!
Add firebase-core to your dependencies block:
implementation 'com.google.firebase:firebase-core:16.0.1'
The Firebase SDK release notes for the June 12 release explain:
Your app gradle file now has to explicitly list
com.google.firebase:firebase-core as a dependency for Firebase
services to work as expected.
It's also safer to list google() first in repository lists:
repositories {
google()
jcenter()
...
}

build.gradle error , Failed to resolve: common [duplicate]

Today suddenly, I got an error when I tried to run my app in Android studio.
It is:
Error: Could not find play-services-tasks.aar (com.google.android.gms:play-services-tasks:15.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-tasks/15.0.1/play-services-tasks-15.0.1.aar
I didn't change anything in the gradle file but it appeared suddenly. My previous build executed successfully some minutes ago.
Why it can't find play-services-tasks.aar which is the part of com.google.android.gms:play-services-tasks:15.0.1
Steps taken:
I checked whether I included all repositories in the gradle files and all are correct so far.
Why does this error occur all of a sudden?
I also copied this link https://jcenter.bintray.com/com/google/android/gms/play-services-tasks/15.0.1/play-services-tasks-15.0.1.aar into the browser but it's working fine, that is, I got "File Download" dialog.
My Gradle Files
App level
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "mekanic24assistantapplication.heba.mekanic24.com.mekanic24assistantapplication"
minSdkVersion 14
targetSdkVersion 26
versionCode 13
versionName "2.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
// err Android Gradle Duplicate files copied in APK META-INF/license.txt
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:26+'
force 'com.android.support:support-annotations:26+'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
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'
})
// compile 'com.android.support:appcompat-v7:26.3.1'
compile 'com.android.support:appcompat-v7:26+'
compile 'com.android.support:design:26+'
compile 'com.android.support:recyclerview-v7:26+'
compile 'com.android.support:cardview-v7:26+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
androidTestCompile 'com.android.support:support-annotations:26+'
testCompile 'junit:junit:4.12'
// compile 'com.android.support:appcompat-v7:26.3.1'
compile 'com.github.markushi:circlebutton:1.1'
// compile 'com.android.support:design:26.3.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.android.gms:play-services-base:15.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.firebase:firebase-client-android:2.5.2'
compile 'com.google.firebase:firebase-core:15.0.2'
compile 'com.google.firebase:firebase-messaging:15.0.2'
compile 'com.google.firebase:firebase-database:15.0.0'
compile 'com.wang.avi:library:2.1.3'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'android.lib.recaptcha:reCAPTCHA:2.0.0'
compile 'com.google.android.gms:play-services-safetynet:15.0.1'
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.squareup.picasso:picasso:2.5.2'
testCompile 'junit:junit:4.12'
compile 'com.anjlab.android.iab.v3:library:1.0.38'
compile files('libs/mail.jar')
compile files('libs/additionnal.jar')
compile files('libs/activation.jar')
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.yarolegovich:lovely-dialog:1.1.0'
compile 'com.mobsandgeeks:android-saripaar:2.0.3'
compile 'com.github.stfalcon:smsverifycatcher:0.3.1'
compile 'ch.acra:acra:4.9.0'
//TODO: Apache 2.0 license https://github.com/ACRA/acra
compile 'com.google.android.gms:play-services-ads:15.0.1'
compile 'com.github.luongvo:GmailBackground:2.0.2'
}
apply plugin: 'com.google.gms.google-services'
Project Level
buildscript {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
maven {
url "https://dl.bintray.com/android/android-tools"
}
maven { url "https://jitpack.io" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.google.gms:google-services:3.2.0'
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
maven {
url "https://dl.bintray.com/android/android-tools"
}
maven { url "https://jitpack.io" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
After doing the following changes the error disappeared:
Removed maven { url 'https://maven.google.com' } from repositories in app build.gradle.
Added maven { url 'https://maven.google.com' } as first entry in allprojects/repositories in top level build.gradle
Changed all play-services and firebase dependencies to the latest versions
Changed version of google-services plugin to classpath 'com.google.gms:google-services:4.0.1'
The fix is to put google url above jcenter() in your repository list in gradle.
Here's the issue: https://issuetracker.google.com/issues/80362794
in my case:
allprojects {
repositories {
google()
jcenter()
}
}
solves my problems
in my old configuration was only "jcenter()"
first line jcenter(), second line google() doesn't work
For my case I removed mavenCentral() from app gradle repositores and moved maven { url 'https://maven.google.com' } to the first positionin in project gradle as Ivan Rigamonti suggested above. No Firebase dependecies update needed.
(this should be a comment, but I don't have enough reputation)
I am getting the same issue today. It was working fine until now. Maybe it's a temporary Google servers issue.
The solution that works for me is using an older version of google-play-services:
implementation 'com.google.android.gms:play-services-maps:11.4.2'
Change
compile 'com.google.android.gms:play-services-safetynet:15.0.1'
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'
to
compile 'com.google.android.gms:play-services-safetynet:16.0.0'
compile 'com.google.android.gms:play-services-maps:16.0.0'
compile 'com.google.android.gms:play-services-places:16.0.0'
compile 'com.google.android.gms:play-services-location:16.0.0'
Is my case, it works!
Could it be that google changed the naming conventions of the packages on the server side?
I'm experiencing the same sort of issue with a different play services package just now.
Namely play-services-basement.aar...
I'm thinking that
Could not find play-services-tasks.aar
Means it's looking for the file named as play-services-tasks.aar
While on the server this file is called:
play-services-tasks-15.0.1.aar
I'm thinking this is either a gradle issue where files aren't named correctly or a server side issue where files aren't named correctly.
Please correct me if I'm mistaken here.
EDIT: this issue should be reported to jcenter.bintray.com since they are the ones being at fault here at their server side. Switching to the Maven repository mentioned by Ivan Rigamonti could be a solution but I'm uncertain how ionic apps deal with switching repositories.
EDIT2: Switching to the maven repository does indeed work for ionic. All I had to do for ionic was to alter build.gradle by putting jcenter() underneath maven() inside of the buildscript repositories and allprojects repositories.
if you Guys Getting Error Like build.gradle error , Failed to resolve: common like this build.gradle error , Failed to resolve: common
then put below line in allprojects scope in repositories scope in Project build.gradle
line :
maven { url 'https://maven.google.com' }
jcenter()
google()
example
allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
google()
}

Android Gradle Sync failed could not find support-core-ui.aar

I've been working on this Android Project for about a year now, suddenly when I opened it yesterday Android Studio 3.1.2 failed to sync gradle and the project doesn't build anymore giving me this error:
Could not find support-core-ui.jar (com.android.support:support-core-ui:27.1.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-core-ui/27.1.1/support-core-ui-27.1.1.jar
Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager
I'm pretty sure that the Android Support Repository is installed correctly because it's working successfully in other projects and all my other projects are working fine with no problems.
I have this gradle file in the app module:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.21.5'
}
}
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'realm-android'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 23
versionCode 32
versionName "3.1"
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
}
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1'
}
}
if (requested.group == 'com.google.android.gms') {
details.useVersion '15.0.1'
}
if (requested.group == 'com.google.firebase') {
details.useVersion '15.0.1'
}
}
}
buildTypes {
release {
minifyEnabled false
// proguardFiles 'proguard.cfg'
}
}
useLibrary 'org.apache.http.legacy'
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES'
}
}
repositories {
maven {
url "https://jitpack.io"
}
maven {
url "https://dl.bintray.com/lukaville/maven"
}
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
mavenCentral()
}
dependencies {
compile project(':FORTSDKv1.4.1')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/gcm.jar')
compile files('libs/httpclient-4.3.4.jar')
compile files('libs/httpmime-4.2.5.jar')
compile files('libs/HockeySDK-3.0.2.jar')
compile files('libs/samsungpay-1.8.00.jar')
compile project(':library-2.4.1')
// Required for geotagging
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true
}
compile('com.code-troopers.betterpickers:library:3.1.0') {
exclude group: 'com.nineoldandroids', module: 'library'
}
compile 'com.android.support:support-v4:27.0.0'
// https://mvnrepository.com/artifact/com.android.support/support-core-ui
compile group: 'com.android.support', name: 'support-core-ui', version: '27.1.1'
compile 'com.android.support:appcompat-v7:27.0.0'
compile 'com.android.support:cardview-v7:27.0.0'
compile 'com.android.support:customtabs:27.0.0'
compile 'com.android.support:multidex:1.0.3'
compile 'com.googlecode.libphonenumber:libphonenumber:8.8.9'
compile 'org.parceler:parceler-api:1.1.5'
compile('com.google.android.gms:play-services-analytics:11.8.0') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.google.android.gms:play-services-maps:15.0.1'
compile 'com.google.android.gms:play-services-auth:15.0.1'
compile 'com.google.android.gms:play-services-gcm:15.0.1'
compile 'com.google.android.gms:play-services-location:15.0.1'
// compile 'com.google.android.gms:play-services-analytics:11.8.0'
compile 'com.github.hackware1993:MagicIndicator:1.5.0'
compile 'com.roomorama:caldroid:2.3.1'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.leocardz:aelv:1.1#aar'
compile 'com.flaviofaria:kenburnsview:1.0.7'
compile('com.jakewharton:butterknife:8.4.0') {
exclude module: 'support-compat'
exclude group: 'com.google.android', module: 'support-v4'
}
compile 'com.pixplicity.easyprefs:library:1.8.1#aar'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.github.jrvansuita:IconHandler:+'
compile 'com.github.mancj:SlideUp-Android:2.2.5'
compile 'com.afollestad:sectioned-recyclerview:0.5.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.facebook.stetho:stetho:1.4.1'
compile 'com.facebook.stetho:stetho-okhttp3:1.4.1'
compile 'com.uphyca:stetho_realm:2.0.0'
compile 'org.greenrobot:eventbus:3.1.1'
compile 'com.birbit:android-priority-jobqueue:2.0.1'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:converter-scalars:2.1.0'
compile 'com.valdesekamdem.library:md-toast:0.8.0'
compile 'com.facebook.android:account-kit-sdk:4.30.0'
compile 'com.facebook.android:facebook-android-sdk:4.17.0'
compile 'com.wang.avi:library:2.1.3#aar'
compile 'com.afollestad.material-dialogs:core:0.9.6.0'
// compile 'com.onesignal:OneSignal:3.6.5'
compile 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
compile 'com.kbeanie:image-chooser-library:1.6.0#aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.scalified:fab:1.1.3'
compile 'com.github.traex.expandablelayout:library:1.2.2'
compile 'com.github.markomilos:paginate:0.5.1'
compile 'com.wdullaer:materialdatetimepicker:3.3.0'
compile 'com.github.tamir7.contacts:contacts:1.1.7'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
compile 'com.github.livechat:chat-window-android:v2.0.0'
compile 'com.uber.sdk:rides-android:0.6.1'
compile 'link.fls:swipestack:0.3.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
compile 'com.victor:lib:1.0.1'
compile 'com.shamanland:fonticon:0.1.8'
compile 'jp.wasabeef:recyclerview-animators:2.2.7'
compile 'com.squareup.okhttp3:logging-interceptor:3.8.0'
compile 'com.github.vihtarb:tooltip:0.1.9'
compile 'com.daasuu:CountAnimationTextView:0.1.1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.5.1'
compile('com.android.billingclient:billing:1.0') {
exclude module: 'support-compat'
exclude group: 'com.google.android', module: 'support-v4'
}
compile('de.keyboardsurfer.android.widget:crouton:1.8.5#aar') {
// exclusion is not necessary, but generally a good idea.
exclude group: 'com.google.android', module: 'support-v4'
}
compile 'com.nbsp:library:1.8'
apt 'com.jakewharton:butterknife-compiler:8.8.1'
apt 'org.parceler:parceler:1.1.5'
compile 'com.google.guava:guava:19.0'
compile 'org.bouncycastle:bcprov-jdk16:1.46'
}
apply plugin: 'com.google.gms.google-services'
Any suggestions or solutions are very appreciated. Thanks.
I just resolved this problem on my own build server. I updated my repositories block in my build.gradle to have google() as the first entry like below:
allprojects {
repositories {
google()
jcenter()
}
}
Edit: removed a repo that was not needed.
Switch from
jcenter()
google()
to
google()
jcenter()
OK, so that's why:
AAPT2 now on Google's Maven repo: To use AAPT2, you must add Google's Maven repository to your project-level build.gradle, as shown below. Learn more
buildscript.repositories {
google()
jcenter()
...
}
allprojects.repositories {
google()
jcenter()
...
}
I added google() in my build.gradle
buildscript {
repositories {
jcenter()
google()
mavenLocal()
maven { url 'https://maven.google.com' }
}
}
allprojects {
repositories {
jcenter()
google()
mavenLocal()
maven { url 'https://maven.google.com' }
}
}
for me it fixed the problem.
You can try it too.
Check if you are working offline.
File > Settings > Write "offline" on the search bar > Gradle > uncheck "offline work".
Use the keyword "implementation" instead of "compile". Compile is deprecated and will be abandoned by the end of 2018. This is a long shot, but something might have changed since the last Android Studio update.
Explicitly add com.android.support:support-core-ui:27.1.1 to your dependencies.
Let me know if it helped.
Good luck.
Update:
If you go to
https://repo.jfrog.org/artifactory/libs-release-bintray/com/android/support/support-core-ui/27.1.1/
You'll find out that your *.jar file is not there.
There are a couple others, though:
support-core-ui-27.1.1-sources.jar
support-core-ui-27.1.1.aar
support-core-ui-27.1.1.pom
You can use the *.aar file instead.
I had this exact problem, realizing I also updated my gradle to 4.8 between my last successful build and the now broken ones. I downgraded back for 4.7 and my continuous integration builds work again.
So I've been able to solve the problem, but maybe just a workaround so at least my CI build passes. It appears that including this line in my gradle dependencies fixed it:
implementation "com.android.support:support-core-utils:27.1.1"
Also I made sure google() is the first one listed in my top-level gradle repository

Cannot install Support repository and sync project in Android Studio

I am trying to use the support libraries of version 25.2.0
so I will be able to use the CameraKit library.
I have got the newest build tools downloaded:
and the support repository:
my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.sample.myapp"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url "https://jitpack.io"
}
mavenCentral()
}
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'
})
testCompile 'junit:junit:4.12'
// Google libraries
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.google.android.gms:play-services-vision:10.0.1'
compile 'com.android.volley:volley:1.0.0'
// Third party libraries
compile 'com.flurgle:camerakit:0.9.17'
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
}
Problem:
For each support-library I get the issue:
Failed to resolve com.android.support:cardview-v7:25.2.0
If I try to click on Install repository and sync project nothing happens.
I have followed that gradle file as an example. Were could be my mistake?
Previously the Android Support Library dependencies were downloaded from Android SDK Manager.
Now all the new versions are available from Google's Maven repository.
In future all android libraries will be distributed through maven.google.com
So, by adding the below code to the repositories will build the project.
repositories {
maven {
url "https://maven.google.com"
}
}
I had to add the following to my project level build.gradle. Then the button to install and worked.
allprojects {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
}
Try using the latest support library versions:
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services-vision:10.2.1'
compile 'com.android.volley:volley:1.0.0'
// Third party libraries
compile 'com.flurgle:camerakit:0.9.17'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
here is the detail Dependencies
EDIT
Use Google Maven Repository
To add them to your build, you need to first include Google's Maven repository in your top-level build.gradle file:
Project -- build.gradle (Not app build.gradle)
allprojects {
repositories {
// If you're using a version of Gradle lower than 4.1, you must instead use:
maven {
url 'https://maven.google.com'
}
// An alternative URL is 'https://dl.google.com/dl/android/maven2/'
jcenter()
}
}
Make sure to put it under allprojects! My mistake was to put it under buildscript.
DON'T DO THIS:
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com' //don't put it here
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
BUT INSTEAD DO THIS:
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com' //put it here
}
}
}

“'this' is not available” in debug windows of Android Studio

Please I really need help with this,
this might seem a duplicate of "'this' is not available" in debug windows of Android Studio
but I need to provide more information to address the specific issue.
So I am in the same situation of the question at the link, but I suspect that it has to do with my build setup.
Please help.
This is my build.gradle:
buildscript {
repositories {
maven { url 'http://download.crashlytics.com/maven' }
mavenCentral()
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
apply plugin: 'com.jakewharton.hugo'
repositories {
maven { url 'http://download.crashlytics.com/maven' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://jitpack.io" }
maven { url 'https://dl.bintray.com/kennyc1012/maven' }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.foo"
minSdkVersion 16
targetSdkVersion 21
versionCode 21
versionName "4.7"
}
buildTypes {
debug {
debuggable true
}
}
packagingOptions {
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'LICENSE.txt'
exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.xml'
exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.properties'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
compile('com.squareup.retrofit:converter-simplexml:2.0.0-beta2') {
exclude module: 'xpp3'
exclude group: 'stax'
}
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:preference-v7:23.1.1'
compile 'com.android.support:palette-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.octo.android.robospice:robospice-spring-android:1.4.14'
compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
compile 'com.octo.android.robospice:robospice-ui-spicelist:1.4.14'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'org.jsoup:jsoup:1.7.2'
compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.1.0#aar'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.getbase:floatingactionbutton:1.9.0'
compile 'com.android.support:design:23.1.1'
compile 'joda-time:joda-time:2.9.1'
compile 'com.squareup.okhttp:logging-interceptor:2.6.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.jayway.android.robotium:robotium-solo:5.5.3'
compile 'com.kennyc:multistateview:1.1'
compile 'com.mikepenz:iconics-core:2.5.2#aar'
compile 'com.mikepenz:fontawesome-typeface:4.5.0.1#aar'
compile 'com.mikepenz:google-material-typeface:2.1.0.1.original#aar'
compile 'me.henrytao:smooth-app-bar-layout:1.0.1'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
}
this is the top level build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
allprojects {
repositories {
jcenter()
}
}
Just remove Hugo, and the problem will be solved. This issue is duplicated and as been already answer in the following post : "'this' is not available" in debug windows of Android Studio
A issue has been published to the Hugo repo.
I meet the same question.Try this method:make your build.gradle have---------> minifyEnabled false.
Sometime i use this way resolve my problem.
This might help, just a silly thing. If you are using minify, then check if it's enabled in debug
buildTypes {
debug {
minifyEnabled true
}
}
To
minifyEnabled false

Categories

Resources