Хорошо, поэтому после некоторой суеты я нашел решение
Я создал новый проект и добавил все дополнительные зависимости, которые использовались в исходном проекте. Затем я скопировал проект Gradle из нового проекта в старый, и он заработал. Я не знаю, как и почему, поскольку оба файла Gradle выглядят одинаково.
Но для сохранения (я могу упустить что-то очевидное) вот оба файла Gradle
Рабочий:
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
google()
}
buildscript{
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
google()
}
}
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
//implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
transitive = true
}
implementation 'androidx.recyclerview:recyclerview:1.0.0-beta01'
implementation 'com.google.android.material:material:1.0.0-beta01'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'com.airbnb.android:lottie:2.8.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
implementation 'androidx.appcompat:appcompat:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'androidx.core:core-ktx:1.0.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
def room_version = "2.1.0-alpha04"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
}
Поврежденный:
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
google()
}
buildscript{
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
google()
}
}
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.2'
// implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
transitive = true
}
implementation 'com.airbnb.android:lottie:2.8.0'
implementation 'com.google.android.material:material:1.0.0-beta01'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'androidx.recyclerview:recyclerview:1.0.0-beta01'
def room_version = "2.1.0-alpha04"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:compiler:$room_version"
}