0

i know the title of this error may seem familiar , but beilive me I have done every thing to solve the problem , but I failed every time! so please help me! i dowloaded a code for and online shop app , i tried to run it in android studio but following error has occurred:

Error:Failed to find Build Tools revision 26.0.2

"install.build.tools">Install Build Tools 26.0.2 and sync project

now here is what i did : at first i was using android studio v 2.3 i checked sdk manager and every thing was installed , to resolve the problem i tried updating it to latest version (v 3.0.1) and I manually instaled sdk 26 and tools_26.0.2 but error wouldnt go away!! :((

here is the code for my build.gradle for a closer look :

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
    applicationId "ir.tameshki.zanbil"
    minSdkVersion 14
    targetSdkVersion 26
    versionCode 2
    versionName "1.1.1"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
}

dependencies {
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'
})
testCompile 'junit:junit:4.12'

// library for user interface
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.balysv:material-ripple:1.0.2'

// library for api
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.google.code.gson:gson:2.4'

// glide image loader
compile 'com.github.bumptech.glide:glide:3.7.0'

// firebase notification library
compile 'com.google.firebase:firebase-messaging:9.2.1'

// firebase ads library
compile 'com.google.firebase:firebase-ads:9.2.1'


compile 'uk.co.chrisjenx:calligraphy:2.3.0'
}

apply plugin: 'com.google.gms.google-services'

and my other gradle file :

// Top-level build file where you can add configuration options common to         
all sub-projects/modules.

buildscript {
repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.0.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {

    google()
    jcenter()
    maven { url "https://jitpack.io" }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
fatima
  • 11
  • 1
  • 6

0 Answers0