在我运行ionic cordova build android
之后,我得到了这个错误:
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 found error
。
我在该URL中没有看到任何android/ cordova特定版本,所以我不能说它来自我的cordova安装。
科尔多瓦版本: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\lib\npm_cache
中没有任何cordova-android
文件夹(我不知道这是否有帮助。我看到人们在谈论这个文件夹)
这里有什么问题?这个URL是从哪里来的?我怎样才能改变它,我能用什么来改变它?
如果我不能轻松地解决这个问题,还有最后一步要做:删除并重新安装所有内容。
谢谢!
https://stackoverflow.com/questions/50563338
复制相似问题