Kotlin: Azure AD B2 C ошибка при импорте библиотеки - PullRequest
1 голос
/ 14 февраля 2020

Во-первых, извините, потому что мой английский sh не хорош.
Я пытаюсь импортировать lib из документа Microsoft в мой проект.
(https://docs.microsoft.com/en-us/samples/azure-samples/active-directory-b2c-android-native-appauth/integrate-azure-ad-b2c-android-app/)
Но я не могу построить свой проект, возвращается сообщение: Невозможно изменить стратегию конфигурации ': app: compile' после ее разрешения .
введите описание изображения здесь
Грейд проекта:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'config/localprops.gradle'
apply from: 'config/keystore.gradle'
buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1'
        classpath 'org.ajoberstar:gradle-git:1.5.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
subprojects {
    repositories {
        jcenter()
        maven {
            url "${rootProject.androidSdkDir}/extras/android/m2repository"
        }
        google()
    }

}

ext.verifyKeystore()

def grgit = org.ajoberstar.grgit.Grgit.open(dir: '.')
def lastCommit = grgit.head()

project.ext.versionNum = grgit.log(includes:['HEAD']).size()
project.ext.versionName = grgit.describe()
project.ext.versionDate = lastCommit.getDate()
if (project.ext.versionName == null) {
    project.ext.versionNme = 'DEV'
}

project.ext.minSdkVersion = 21
project.ext.compileSdkVersion = 28
project.ext.buildToolsVersion = '28.0.3'
project.ext.supportLibVersion = '28.0.0'

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}


Грейд приложения:

    apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

apply plugin: 'com.android.application'
apply plugin: 'checkstyle'
apply from: '../config/localprops.gradle'
apply from: '../config/keystore.gradle'
apply from: '../config/style.gradle'
android {
     compileSdkVersion 28
      buildToolsVersion "28.0.3"
    defaultConfig {
        applicationId "cisbox.s.vas"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
//    buildTypes {
//        release {
//            minifyEnabled false
//            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
//        }

    signingConfigs {
        debugAndRelease {
           storeFile file("${rootDir}/appauth.keystore")
           storePassword "appauth"
            keyAlias "appauth"
          keyPassword "appauth"
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debugAndRelease
        }
        release {
            signingConfig signingConfigs.debugAndRelease
        }
    }
}


dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.core:core-ktx:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation Libs.material
    implementation Libs.customControl
    implementation Libs.cardView
    implementation Libs.ankoCommon
    implementation Libs.picasso
    implementation Libs.lifecycleExt
    kapt Libs.lifecycleCombile
}
repositories {
    mavenCentral()
    jcenter()
}


Я использую android Студийная версия 3.5.3
Пожалуйста, помогите решить проблему
Спасибо.

...