![](/img/trans.png)
[英]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
[英]NativeScript | Can't run Android app: Please fix the version conflict either by updating the version of the google-services plugin
無法使用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;
}
通過更新本機腳本依賴項並刪除了nativescript-push-notifications依賴項來解決此問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.