I have recently updated my Android Studio to 3.1.2 . After the update I tried opening the existing project and was shown multiple gradle errors while compiling the project.
Those errors pointed me to update the 'compile' statement to 'implementation', which I did, still faced some errors which I later solved by updating my google play and firebase sdks to latest version.
Now I have no clue why is my IDE giving the following error (look at the screenshot).
Failed to resolve: runtime
).
Now when I did Build > Clean Project
The error was Could not find runtime.aar (android.arch.lifecycle:runtime:1.0.3). Screen shot
What to do next?
SOLUTION:
yes ,
If you are getting error like error run time you can change the position of google() in dependencies in build. gradle.. Like below:
repositories {
google()
jcenter()
}
android.arch.lifecycle:runtime
is available at the google maven repository. Make sure you add the repository in the repositories block of your build.gradle
allprojects {
repositories {
jcenter()
google()
}
}
or
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
}
Reference : Adding Components to your Project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With