找不到runtime.jar(android.arch.lifecycle:runtime:1.0.0) [英] Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0)
问题描述
在我运行离子cordova构建android
后出现此错误:
After I am running ionic cordova build android
I get this error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':debugCompileClasspath'.
> Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar
这是对的。当我转到此URL https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar
我得到了一个 404未找到错误
作为JSON。
And it is right. When I go to this URL https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar
I get an 404 Not found error
as a JSON.
我没有看到任何android / cordova特定版本URL所以我无法从我的cordova安装中说出来。
I don't see any android/ cordova specific versions in that URL so I can't say its from my cordova installation.
Cordova版本: 7.1.0
Cordova version: 7.1.0
离子信息:
cli packages: (C:\Users\%User%\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : not installed // this is strange. I can run cordova in my terminal tho
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 6.4.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.4.0
npm : 5.3.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Users\%User%\AppData\Local\Android\Sdk
Misc:
backend : pro
此外,我在 C:\ Users \%USER%\中没有任何
(我不知道这是否有帮助。我看到有人在谈论这个文件夹) cordova-android
文件夹。 cordova \ lib \ nnpm_cache
Also, I don't have any cordova-android
folders in C:\Users\%USER%\.cordova\lib\npm_cache
(I don't know if this helps. I saw people talking about this folder)
问题是什么这里?该URL来自哪里?如何更改它以及我可以更改它?
What's the problem here? Where is that URL coming from? How can I change it and with what can I change it?
如果我不能轻易解决这个问题,还有最后一步:删除并重新安装所有内容。
If I cannot solve this easily there is one last step to do: remove and install everything again.
谢谢!
推荐答案
快速临时修复是将google maven repo包含在您的顶级gradle文件中。
A quick temporary fix is to include the google maven repo in your top level gradle file.
allprojects {
repositories {
mavenLocal()
maven { url 'https://maven.google.com' } // <-- add this!
jcenter()
这篇关于找不到runtime.jar(android.arch.lifecycle:runtime:1.0.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!