离子科尔多瓦建立错误runtime.aar

时间:2018-06-22 09:02:30

标签: android ionic3

机器人Android出现错误

找不到runtime.aar(android.arch.lifecycle:runtime:1.1.0)。 在以下位置搜索: https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.1.0/runtime-1.1.0.aar

为什么会出现此错误?

1 个答案:

答案 0 :(得分:0)

我通过修改gradle.build来解决此问题:

buildscript {
repositories {
    google()
    jcenter()
    maven {
        url "https://maven.google.com"
    }
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
}}

这:

allprojects {
repositories {
    google()
    jcenter()
    maven {
        url "https://maven.google.com"
    }
}
project.ext {
  defaultBuildToolsVersion="25.0.2" //String
  defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
  defaultTargetSdkVersion=26 //Integer - We ALWAYS target the latest by default
  defaultCompileSdkVersion=26 //Integer - We ALWAYS compile with the latest by default
}}

我刚刚在jcenter()语句之前添加了“ google()”。

另外,为Ionic安装Firebase:

$ ionic cordova plugin add cordova-plugin-firebase
$ npm install --save @ionic-native/firebase

希望对您有所帮助:)