Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
103 views
in Technique[技术] by (71.8m points)

Android Studio 3.1.2 : Failed to resolve: runtime

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

enter image description here).

Now when I did Build > Clean Project

The error was Could not find runtime.aar (android.arch.lifecycle:runtime:1.0.3). Screen shot enter image description here

What to do next?

SOLUTION:

  1. I updated all my google play services and firebase libs.
  2. To solve could not find runtime aar, I just simply arranged the google() on top in repositories.
question from:https://stackoverflow.com/questions/50584437/android-studio-3-1-2-failed-to-resolve-runtime

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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()

}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...