Answer the question
In order to leave comments, you need to log in
What should I change in Build.graidle to make the project build?
Good afternoon!
My project stopped building in Android Studio after updating the Graidle plugin and Android Studio. The output is:
1) When building the project:
Unresolved reference: crashlytics
Unresolved reference: fabric
Unresolved reference: Fabric
Unresolved reference: Crashlytics
2) When starting the project:
Could not find :unspecified:.
Required by:
project :app > id.zelory:compressor:2.1.0
First errorI suspect the error is related to jcenter(). However, the advice to add the google() and mavenCentral() repositories to the build.gradle and dependencies.gradle files and arrange them in the order google(), mavenCentral(), jcenter() didn't work. As well as removing jcenter() in principle (advice from Android Studio).
The second error is generally incomprehensible to me, because the compressor is registered in the dependencies.gradle file.
The main question is: how to fix the errors?
The dependencies.gradle file now looks like this:
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
ext {
...
compressor_version = '2.1.0'
...
mainApplication = [
...
compressor: "id.zelory:compressor:$compressor_version",
...
}
apply from: 'buildsystem/dependencies.gradle'
buildscript {
ext.kotlin_version = '1.5.21'
ext.gradle_tools = '3.3.2'
ext.build_tools = '27.0.3'
ext.compile_sdk = 28
ext.target_sdk = 28
ext.min_sdk = 21
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.gms:google-services:4.3.8"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question