Encountering an issue while attempting to run the Nativescript Android application on my device. The error message states: Could not find method android() for arguments [before_plugins_d5qrcua3za3scd760qug60fz6$_run_closure1@5754ca71] on root project 'xyz' of type org.gradle.api.Project. How can I resolve this problem?
The code in before-plugins.gradle:
android {
project.ext {
googlePlayServicesVersion = "15.0.0"
}
}
The package.json file contains:
{
"name": "xyz",
"main": "./src/main.ts",
"version": "1.0.0",
"private": true,
// List of dependencies...
}
Error message screenshot: https://i.sstatic.net/9Hcdq.png