Какими должны быть зависимости gradle для compileSDK versio 28 в андроид студии 3.2.1 - PullRequest
0 голосов
/ 17 декабря 2018

Вот код gradle.Невозможно синхронизировать каждый раз.Я действительно застрял здесь.Пожалуйста, помогите мне.Заранее спасибо.Ошибка не устранена: все строки между зависимостями {}

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"
    defaultConfig {
        applicationId "global.alyssum.charcha"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'androidx.appcompat:appcompat:1.0.0-alpha1'
    compile 'androidx.constraintlayout:constraintlayout:1.1.2'
    compile 'com.google.android.material:material:1.0.0-alpha1'
    testCompile 'junit:junit:4.12'
    androidTestCompile 'androidx.test:runner:1.1.0-alpha3'
    androidTestCompile 'androidx.test.espresso:espresso-core:3.1.0-alpha3'

}

1 Ответ

0 голосов
/ 17 декабря 2018

Файл сборки верхнего уровня:

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Файл сборки уровня модуля:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "global.alyssum.charcha"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        staging {
            signingConfig signingConfigs.debug
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...