user9979068
user9979068

Reputation:

Gradle related error

I have recently started using the android studio. Just after installing and downloading all the requisite files, I am welcomed by this error,"Failed to find the target with the hash string 'API 27'....", whereas I already have both API 27 and 28 installed (although 28 shows up to be partly installed).

I am completely new to this software.

Tools

SDK

error

1]

Upvotes: 0

Views: 50

Answers (1)

vikas kumar
vikas kumar

Reputation: 11018

you should use like below in gradle

{

        compileSdkVersion 27
        buildToolsVersion '27.0.1'
        defaultConfig {
            applicationId "xxxxxxxxx"
            minSdkVersion 15
            targetSdkVersion 27
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            multiDexEnabled true
        }

}

don't write like compileSdkVersion 'API 27' its compileSdkVersion 27 only

Upvotes: 1

Related Questions