0

I ran this command ionic cordova run android but it gave this error: build tool not found. When I run android studio the build function runs properly without any errors. I just can't understand what to do. Even I removed the platform folder and add this but the error does not change. I have

  • Windows10
  • Ionic 3.5
  • node-v6.11.1-x64
  • emulator: API 25
The given error is:-
Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova build android (exit code 1):

     FAILURE: Build failed with an exception.
        * Where:
        Script 'E:\wamp64\www\nutricity\platforms\android\CordovaLib\cordova.gradle' line: 64

        * What went wrong:
        A problem occurred evaluating root project 'android'.
        > No installed build tools found. Install the Android build tools version 19.1.0 or higher.

        * Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Ajoy Karmakar
  • 671
  • 7
  • 14

2 Answers2

0

If its says that, it means that the system: 1 : It really really really did not found build tools

2 : To make him find build tools you need to define these paths correctly

People have experience this before and possible solutions could be found here: ionic build Android | error: No installed build tools found. Please install the Android build tools

thefolenangel
  • 972
  • 9
  • 29
  • I defined the path:- ANDROID_HOME > E:\Android\tools ; JAVA_HOME > C:\Program Files\Java\jdk1.8.0_111; [Now what to do] – Ajoy Karmakar Jul 19 '17 at 07:45
0

Solution that worked for me:

  • Right click This PC(My computer)
  • Click Properties
  • Go to Advance System Settings
  • Click Environment variables
  • Inside System Variable find Path and Edit It
  • Insert three 4 paths: SDK, Build tools, Platform tools, Platform

(Default path if you have not changed)

  • C:\Users[Your Username]\AppData\Local\Android\Sdk
  • C:\Users\Saddam Khan\AppData\Local\Android\Sdk\build-tools
  • C:\Users\Saddam Khan\AppData\Local\Android\Sdk\platform-tools
  • C:\Users\Saddam Khan\AppData\Local\Android\Sdk\platform