首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法为org.gradle.api.Project类型的根项目“xyz”上的参数[org.gradle.api.Project]找到android()方法

无法为org.gradle.api.Project类型的根项目“xyz”上的参数[org.gradle.api.Project]找到android()方法
EN

Stack Overflow用户
提问于 2022-03-21 13:26:08
回答 1查看 841关注 0票数 1

在我的设备上运行本地文本android应用程序时有问题。无法为org.gradle.api.Project类型的根项目'xyz‘上的参数org.gradle.api.Project找到android()方法。如何克服这一问题?

前-plugins.gradle:

代码语言:javascript
复制
android {  
  project.ext {
      googlePlayServicesVersion = "15.0.0"
  }
} 

package.json:

代码语言:javascript
复制
{
  "name": "xyz",
  "main": "./src/main.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "~13.1.1",
    "@angular/common": "~13.1.1",
    "@angular/compiler": "~13.1.1",
    "@angular/core": "~13.1.1",
    "@angular/forms": "~13.1.1",
    "@angular/http": "^7.2.16",
    "@angular/platform-browser": "~13.1.1",
    "@angular/platform-browser-dynamic": "~13.1.1",
    "@angular/router": "~13.1.1",
    "@mashdog/nativescript-accordion": "^7.0.6",
    "@nativescript/angular": "^13.0.0",
    "@nativescript/core": "^8.2.1",
    "@nativescript/firebase": "^11.1.3",
    "@nativescript/geolocation": "^8.0.2",
    "@nativescript/iqkeyboardmanager": "^2.0.0",
    "@nativescript/theme": "~3.0.1",
    "@nstudio/nativescript-checkbox": "^2.0.4",
    "@nstudio/nativescript-loading-indicator": "^4.1.2",
    "@triniwiz/nativescript-youtubeplayer": "^4.1.4",
    "nativescript-drop-down": "^6.0.0",
    "nativescript-feedback": "^2.0.0",
    "nativescript-phone": "^3.0.2",
    "nativescript-ripple": "^4.0.1",
    "nativescript-store-ratings": "^1.0.0",
    "nativescript-theme-core": "^2.0.24",
    "nativescript-ui-listview": "^10.0.2",
    "rxjs": "~7.4.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^13.1.1",
    "@angular/compiler-cli": "~13.1.1",
    "@nativescript/android": "8.2.2",
    "@nativescript/ios": "8.2.1",
    "@nativescript/types": "~8.1.1",
    "@nativescript/webpack": "~5.0.0",
    "@ngtools/webpack": "^13.1.1",
    "typescript": "4.4.4"
  }
}

错误信息:

EN

回答 1

Stack Overflow用户

发布于 2022-04-06 11:14:39

我也有过同样的问题。在查看了更新后的Nativescript文档之后,我更改了以前的插件。

代码语言:javascript
复制
ext {
  googlePlayServicesVersion = "15.0.0"
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71558384

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档