找不到 runtime.jar (android.arch.lifecycle:runtime:1.0.0) [英] Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0)
问题描述
在我运行 ionic cordova build 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 Not发现错误
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.
我在该 URL 中没有看到任何 android/cordova 特定版本,因此我无法从我的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%AppDataRoaming
pm
ode_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%AppDataLocalAndroidSdk
Misc:
backend : pro
此外,我在 C:Users\%USER%.cordovalib
pm_cache
中没有任何 cordova-android
文件夹(我没有知道这是否有帮助.我看到有人在谈论这个文件夹)
Also, I don't have any cordova-android
folders in C:Users\%USER%.cordovalib
pm_cache
(I don't know if this helps. I saw people talking about this folder)
这里有什么问题?该网址来自哪里?我怎样才能改变它,我可以用什么来改变它?
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屋!