You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

NativeScript无法运行Android应用:google-services插件版本冲突求助

Fixing NativeScript Android Build Failure: Google Services Version Conflict

Hey there, let's get this build failure sorted out for your NativeScript Android app. The error you're seeing (:app:processDebugGoogleServices failure) is caused by a version mismatch between the Google Services plugin and the Google Play Services libraries in your project. Here are two straightforward fixes:

Option 1: Update the Google Services Plugin Version

Locate the root-level build.gradle file in your project (not the app module's one). Find the buildscript block's dependencies section, then update the google-services plugin to its latest stable version:

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        // Replace the version below with the latest stable google-services plugin version
        classpath 'com.google.gms:google-services:4.3.15' // Example version, adjust to current latest
    }
}

Option 2: Update com.google.android.gms to Version 11.4.0

If you prefer not to update the plugin, you can instead align all your Google Play Services dependencies to version 11.4.0. Open your app module's build.gradle (or for NativeScript, check App_Resources/Android/app.gradle) and ensure every com.google.android.gms entry uses this version:

dependencies {
    // Example: Update auth library to 11.4.0
    implementation 'com.google.android.gms:play-services-auth:11.4.0'
    // Repeat this for all other com.google.android.gms related dependencies in your project
}

Pro Tip After Making Changes

Don't forget to clean your build cache to avoid leftover conflicts:

  • For NativeScript, run: ns clean
  • For plain Android projects, run: ./gradlew clean

Then try rebuilding your app with ns run android — this should resolve the version conflict error.

内容的提问来源于stack exchange,提问作者savitaMandlekar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.12 04:22:59