I am developing a project and 2-3 days ago it was working fine and being installed on the devices connected to the system. but today i tried to install it on a device and the error comes up ,
Error:Failed to resolve: com.android.support:support-annotations:27.0.1
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:/home/sharan/Dropbox/ptfix_androidlocal/ptfix/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
many more similer errors also.
My app Gradle Code is below.
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.1'
defaultConfig {
applicationId "com.ameba.ptfix"
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'
}
}
android {
useLibrary 'org.apache.http.legacy'
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'
}
}
}
repositories {
jcenter()
maven { url "https://dl.bintray.com/drummer-aidan/maven" }
flatDir {
dirs 'libs'
}
maven {
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
compile('org.apache.httpcomponents:httpmime:4.3') {
exclude module: "httpclient"
}
compile('org.apache.httpcomponents:httpcore:4.4.1') {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
compile project(':slideDateTimePicker')
compile project(':ImageCropper')
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.google.android.gms:play-services:10.2.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.sundeepk:compact-calendar-view:2.0.0'
compile 'com.afollestad:material-camera:0.4.4'
compile 'life.knowledge4:k4l-video-trimmer:1.1.3-SNAPSHOT'
compile 'com.google.firebase:firebase-messaging:10.2.1'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.juanlabrador:badgecounter:1.0.2@aar'
compile 'com.github.oxoooo:touch-image-view:1.0.1'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
compile 'com.paypal.sdk:paypal-android-sdk:2.15.3'
}
apply plugin: 'com.google.gms.google-services'
I am hoping for some help so that my project can start working again . Any help will be highly appreciated.
My root Gradle code is this
// 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://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}