问题描述
我最近将我的 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).
无法解析:运行时
).
现在当我做构建>清理项目
错误是找不到 runtime.aar (android.arch.lifecycle:runtime:1.0.3).截屏
接下来要做什么?
解决方案:
- 我更新了我所有的 google play 服务和 firebase 库.
- 为了解决找不到运行时 aar,我只是简单地将 google() 安排在存储库的顶部.
- I updated all my google play services and firebase libs.
- To solve could not find runtime aar, I just simply arranged the google() on top in repositories.
推荐答案
yes ,
如果您遇到类似错误运行时的错误,您可以更改 google() 在 build.gradle 依赖项中的位置.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:无法解析:运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!