0
apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.example.mypc.pop_up"
        minSdkVersion 15
        targetSdkVersion 27
        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:27.+'
    compile 'com.android.support:design:27.+'
}
Ratilal Chopda
  • 4,162
  • 4
  • 18
  • 31

2 Answers2

1
compileSdkVersion 27
buildToolsVersion '26.0.2'
defaultConfig {
    applicationId "com.your.package"
    minSdkVersion 15
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

dependencies {
   final SUPPORT_LIBRARY_VERSION = '27.0.1'
   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:$SUPPORT_LIBRARY_VERSION"
}

Hi you should use like this

0

Important: The support libraries are now available through Google's Maven repository. You do not need to download the support repository from the SDK Manager. For more information, see Support Library Setup.

Step 1: Open the build.gradle file for your application.

Step 2: Make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint. For example:

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}
Nikhil PV
  • 1,014
  • 2
  • 16
  • 29