简体   繁体   English

NativeScript | 无法运行Android应用:请通过更新google-services插件的版本来解决版本冲突

[英]NativeScript | Can't run Android app: Please fix the version conflict either by updating the version of the google-services plugin

Cannot build & run Android application using the NativeScript command: 无法使用NativeScript命令构建和运行Android应用程序:

tns run android

I get this error in the console: 我在控制台中收到此错误:

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.

I tried removing the Android platform from the project and than adding it again but it doesn't work. 我尝试从项目中删除Android平台,然后再次添加它,但是它不起作用。

How do I update the google-services plugin? 如何更新google-services插件? I don't have any dependencies in my app.gradle file. 我的app.gradle文件中没有任何依赖项。

Here's my app.gradle file: 这是我的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;
}

通过更新本机脚本依赖项并删除了nativescript-push-notifications依赖项来解决此问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 请通过更新google-services插件的版本或将com.google.android.gms更新到9.4.0来解决版本冲突。 - Please fix the version conflict either by updating the version of the google-services plugin or updating com.google.android.gms to 9.4.0 通过更新google-services插件的版本来解决版本冲突 - fix the version conflict either by updating the version of the google-services plugin 如何解决“请通过更新google-services插件的版本来解决版本冲突” - How to fix “Please fix the version conflict either by updating the version of the google-services plugin” 请通过更新google-services插件的版本来解决版本冲突? - Please fix the version conflict either by updating the version of the google-services plugin? 错误:请通过更新 google-services 插件的版本来解决版本冲突 - Error : Please fix the version conflict either by updating the version of the google-services plugin 请通过更新google-services插件或updati的版本来修复版本冲突 - Please fix the version conflict either by updating the version of the google-services plugin or updati 请通过更新google-services插件的版本来解决版本冲突 - Please fix the version conflict either by updating the version of the google-services plugin gradle同步失败,出现1条警告,请通过将google-services插件的版本更新为16.0.4来解决版本冲突 - gradle sync failed with 1 warning Please fix the version conflict either by updating the version of the google-services plugin to 16.0.4 错误:请通过更新google-services插件的版本来解决版本冲突 - Error:Please fix the version conflict either by updating the version of the google-services plugin 错误“请通过更新google-services插件的版本来解决版本冲突 - Error "Please fix the version conflict either by updating the version of the google-services plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM