-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build any plugins (Android) *Failed to build plugin @nativesctript/core #5649
Comments
@CTOaramos looks like potentially sdk version related - when possible could you run this command and post the results: echo 'y' | npx nativescript-envinfo |
Hi, @NathanWalker thank you for the response here it is; im not sure why is that not found; i have my emulator running from android studio i have downloaded some build tools i don't know how can i fix that not found issue ; im just trying to run the hello world template; what i have tried so far
|
Hi, @NathanWalker, I have added sdkmanager in the $PATH and the it changed; |
@CTOaramos please share your But before any of that, please make sure you install the latest cli - seems like you are on 8.1.5.
|
Hi, @rigor789 Im running the Hello World template Typescript; |
I can confirm that I'm getting the same issue on both newly created projects and existing ones.
I'm using M1 Mac. |
Please post the stack-trace, so we can do some searching as well - seems to happen for a few people, but not everyone - there must be some correlation between the cases, we just don't know what yet... Since gradle itself is throwing the error, I believe it to be a gradle bug/issue - that's what I would focus my search on... |
Please include it in a textual form - I can't copy it from screenshots. |
|
I couldn't find anything yet - can you run this in a new project, and then zip up the Also try running the build with |
Here is the trace log https://pastebin.com/7zGtYWBF |
Here's mine; log trace: https://pastebin.com/CU6jmN0m |
open try {
yield this.$childProcess.spawnFromEvent(gradlew, localArgs, "close", {
cwd: pluginBuildSettings.pluginDir,
stdio: "inherit",
});
}
catch (err) {
this.$errors.fail(`Failed to build plugin ${pluginBuildSettings.pluginName} : \n${err}`);
} Add a console log right after the try {
console.log('gradlew', gradlew);
console.log('localArgs', localArgs);
console.log('pluginBuildSettings.pluginDir', pluginBuildSettings.pluginDir);
yield this.$childProcess.spawnFromEvent(gradlew, localArgs, "close", {
cwd: pluginBuildSettings.pluginDir,
stdio: "inherit",
});
// ... And build again, and let me know what those logs print - I suspect something might be off there - but not sure what, this might help identify the issue. |
@rigor789 here is the log after changes https://pastebin.com/KwCLYVRw |
@milosmatic when you get a chance could you run the following command and copy/paste the results (not screenshots) including the invocation of the command visible in the output:
|
@NathanWalker here it is OS: macOS 12.3
CPU: (10) arm64 Apple M1 Pro
Shell: /bin/zsh
node: 17.7.2
npm: 8.5.2
nativescript: 8.2.2
# android
java: 11.0.14.1
ndk: Not Found
apis: 27, 28, 29, 30, 31
build_tools: 27.0.3, 28.0.3, 29.0.3, 30.0.3, 31.0.0
system_images:
- android-30 | Google Play ARM 64 v8a
# ios
xcode: 13.3/13E113
cocoapods: 1.11.2
python: 3.9.10
python3: 3.9.10
ruby: 2.7.5
platforms:
- DriverKit 21.4
- iOS 15.4
- macOS 12.3
- tvOS 15.4
- watchOS 8.5 Dependencies"dependencies": {
"@angular/animations": "~13.2.0",
"@angular/common": "~13.2.0",
"@angular/compiler": "~13.2.0",
"@angular/core": "~13.2.0",
"@angular/forms": "~13.2.0",
"@angular/platform-browser": "~13.2.0",
"@angular/platform-browser-dynamic": "~13.2.0",
"@angular/router": "~13.2.0",
"@nativescript/angular": "^13.0.0",
"@nativescript/core": "~8.2.0",
"@nativescript/theme": "~3.0.2",
"rxjs": "~7.5.0",
"zone.js": "~0.11.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.2.0",
"@angular/compiler-cli": "~13.2.0",
"@nativescript/android": "8.2.2",
"@nativescript/ios": "8.2.1",
"@nativescript/types": "~8.2.0",
"@nativescript/webpack": "~5.0.6",
"@ngtools/webpack": "~13.2.0",
"typescript": "~4.5.5"
}
|
Having the same gradle issue: Below is my package.json
Using the following: Same gradle ENOENT error as above |
Reset my mac the 3rd time; still no luck; this was working 2 months ago; the only things that i did that i think that could cause this are;
i reset my mac and all use all the updated version; still cannot build any plugin (Hello World Template) |
@CTOaramos we recommend node 16 or 17 with npm 7 or 8 at least. |
@milosmatic only thing that jumps out is build-tools 31 which you have installed is corrupted (something on androids side which was discussed couple months back among the android community: https://stackoverflow.com/questions/68387270/android-studio-error-installed-build-tools-revision-31-0-0-is-corrupted) - I would recommend installing build-tools 32 and ensure those are set in your app.gradle for example: compileSdkVersion 32 |
I'm getting the same error.
|
Here's mine still getting the same error app.gradle// You can add your native dependencies here android { defaultConfig {
} aaptOptions {
|
Having the same error as the first post of this thread, line by line. Is everyone in this thread having this issue using a Mac with an M1/M1 pro chip? |
Good news, I am able to reproduce the issue with node installed via Homebrew. I'm looking into it, but in the meantime, you can try installing node with a version manager like nvm, n, volta etc. That seems to work all around... |
Some node installations have trouble with relative paths passed to child_process.spawn() - so in those cases we resolve the full path instead. ref #5649
I have pushed out a fix that should fix this - please try npm i -g nativescript@next And then build again, and let me know if still running into an issue. |
Hi, @rigor789 MAN! YOU ARE A HERO!! Thank you; i was able to build now;
|
Hi, @rigor789 I had the same issue since this morning (I'm from Italy), then after a Thanks! 😆 |
@rigor789 I can confirm that the issue is gone. Excellent work! |
Thanks for confirming, will publish a patch release shortly... As for why this was required, I frankly don't know - but node installed through Homebrew had trouble spawning a relative path command like |
I have the same/similar issue with v8.5.0 on a Rocky 9 linux virtual machine (build with TeamCity):
And my app.gradle looks like
On my local machine I can build successfully. |
@danielritter not sure where that revision string is coming from, but sound like that's the issue
|
@rigor789 Thanks, I had to delete the file build-tools_r33.0.2-linux.zip in the build-tools folder, I recently added it there before. Now it can build successfully. Thanks! |
Issue Description
Hi, does anyone experienced this ? im trying to run the Hello World Template (Pure Typescript)
Here's my current versions
Reproduction
No response
Relevant log output (if applicable)
No response
Environment
No response
Please accept these terms
The text was updated successfully, but these errors were encountered: