当我跑步之后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
这是对的。当我访问这个网址时https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar
我得到一个404 Not found error
作为 JSON。
我在该 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
另外,我也没有cordova-android
文件夹中C:\Users\%USER%\.cordova\lib\npm_cache
(我不知道这是否有帮助。我看到人们在谈论这个文件夹)
这里有什么问题?该 URL 来自哪里?我该如何改变它以及用什么来改变它?
如果我无法轻松解决此问题,则需要执行最后一步:删除并重新安装所有内容。
谢谢你!
一个快速的临时修复是将 google maven 存储库包含在您的顶级 gradle 文件中。
allprojects {
repositories {
mavenLocal()
maven { url 'https://maven.google.com' } // <-- add this!
jcenter()
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)