Android Studio 3.1.2:无法解决:运行时 [英] Android Studio 3.1.2 : Failed to resolve: runtime
问题描述
我最近将Android Studio更新为3.1.2。更新后,我尝试打开现有项目,并在编译项目时看到多个gradle错误。
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.
这些错误指出我要更新'compile'我所做的'implementation'声明仍然遇到一些错误,后来我通过将google play和firebase sdks 更新为最新版本解决了这些错误
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.
现在我不知道为什么我的IDE出现以下错误(请看截图)。
Now I have no clue why is my IDE giving the following error (look at the screenshot).
无法解决:运行时
)。
现在当我完成 Build> Clean Project
错误是找不到运行时.aar (android.arch.lifecycle:runtime:1.0.3)。
屏幕截图
The error was Could not find runtime.aar (android.arch.lifecycle:runtime:1.0.3). Screen shot
下一步做什么?
解决方案:
- 我更新了我所有的Google Play服务和firebase库。
- 要解决找不到运行时文件的问题,我只是安排了 google()
推荐答案
是,
如果您遇到错误(例如错误运行时),则可以更改google()在构建依赖项中的位置。 gradle ..如下所示:
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 Studio 3.1.2:无法解决:运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!