question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tns platform android is failing

See original GitHub issue

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 7.0.4
  • Cross-platform modules: No Such Modules
  • Android Runtime:
  • Plugin(s):No Plugin

Describe the bug I ran tns platform add android and I get following error

ubuntu@ubuntu-ck0xxx:~/Projects/nativescript/test$ tns platform add android
Copying template files...
Command failed: npm view @nativescript/android  dist-tags --json

To Reproduce I setup the environment on ubuntu, created a fresh project and got error while adding android.

Expected behavior

It should add the platform

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
GAGANsinghmsitececommented, Jan 15, 2021

I uninstalled npm which i installed from apt and installed it again using nvm, and now it works fine

0reactions
NathanaelAcommented, Jan 14, 2021

Going to jump in here real quick as I run on linux also.

  1. Can you do a whereis npm
  2. Are you running a standard bash shell or a different default shell?
  3. Can you close your terminal, open another terminal window (so it is 100% fresh) then do the following command: npm --version && tns platform add android
  4. You might consider upgrading to a later version of NS. npm i -g nativescript@7.0.11 – I know version 7.0.11 works great on linux as that is what I have currently installed. But I don’t recall any issues with the earlier versions (but I tend to upgrade as needed)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - NativeScript Docs
tns run android throws Java (javac) error. Solution: Solution provided by KristiyanFxy a member of the NativeScript community. Link to original solution here....
Read more >
When uninstall nativescript plugin and run 'tns run android ...
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED....
Read more >
Best day-to-day Development workflow to avoid "Failed to find ...
tns platform remove android. tns platform add android. tns prepare android. tns build android. ALL of that gets it back to BUILDing… But...
Read more >
Building Android MDK client with NativeScript Plugin
tns run android --device <device identifier> ... MDK Client/node_modules/@nativescript-rtl/ui/platforms/android/ui.aar.
Read more >
NativeScript 5.4 Build Failures - fluentReports
FAILURE : Build failed with an exception. ... Execution failed for task ':app:processDebugManifest'. ... tns platform add android@next.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found