【发布时间】:2019-08-30 12:47:55
【问题描述】:
安装nativescript-plugin-firebase 后,我无法再使用tns build android 构建我的应用程序。
我收到此错误:
nativescript-plugin-firebase: running release build or change in environment detected, forcing prepare!
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'nativescript_plugin_firebase'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:3.4.2.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.jar
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.jar
Required by:
project :
这是我的platforms/android/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Here 是platforms/android/app/build.gradle:
Here 是platforms/tempPlugin/nativescript_plugin_firebase/build.gradle
【问题讨论】:
-
我认为 gradle 构建和工具版本不匹配
-
@JawadMalik 我该如何解决?
-
显示应用级 build.gradle
-
也分享你的 build.gradle 模块应用文件
-
@JawadMalik build.gradle 模块应用文件在哪里?
标签: android firebase gradle android-gradle-plugin nativescript