无法使用NativeScript命令构建和运行Android应用程序:
tns run android
我在控制台中收到此错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.4.0.
我尝试从项目中删除Android平台,然后再次添加它,但是它不起作用。
如何更新google-services插件? 我的app.gradle文件中没有任何依赖项。
这是我的app.gradle文件:
// Add your native dependencies here:
// Uncomment to add recyclerview-v7 dependency
//dependencies {
// compile 'com.android.support:recyclerview-v7:+'
//}
android {
defaultConfig {
generatedDensities = []
applicationId = "com.grizlizli.app"
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
def settingsGradlePath
if(project.hasProperty("appResourcesPath")){
settingsGradlePath = "$project.appResourcesPath/Android/settings.gradle";
} else {
settingsGradlePath = "$rootDir/../../app/App_Resources/Android/settings.gradle";
}
def settingsGradleFile = new File(settingsGradlePath);
if(settingsGradleFile.exists())
{
apply from: settingsGradleFile;
}
答案 0 :(得分:0)
设法通过更新本机脚本依赖项并删除 nativescript-push-notifications 依赖项来解决此问题。