• Register
0 votes

Problem :

I am trying to learn the Android and Ionic. If I run the ionic build android command in the root of the ionic project, I am facing below error:

FAILURE: Build failed with an exception.
•Where: Script '/home/javad/Desktop/javadApp/platforms/android/CordovaLib/cordova.gradle' line: 64
•What went wrong: A problem occurred evaluating root project 'android'.
No installed build tools found. Please 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.


8 4 2
2,300 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I was going through some of the interesting questions on this forum and I came across your question.

It is very common error for the programmers who are new to Android and Ionic.

I guess you might have forgotten to set the class paths properly.

Please set the paths as shown below they are same for Ubantu and Mac

export ANDROID_HOME=/Users/mphil/Software/android-sdk-macosx

export PATH=${PATH}:/Users/mphil/Software/android-sdk-macosx/tools

export PATH=${PATH}:/Users/mphil/Software/android-sdk-macosx/platform-tools

After setting up the environment variables you must reload the environment variables using below commands

//For your ubuntu

$source .bashrc

//For your macos

$source .bash_profile

Now you can check in your terminal using below commands

$printenv ANDROID_HOME

$printenv PATH

If  you do not see your changes in printenv then try to restart your pc and run above commands again.

Now open the terminal and write $and and try to hit the tab if you see the complete $android then your installation is properly done.

Now you will not face above error.

5 2 1
4,980 points

Related questions

0 votes
2 answers 106 views
Problem : I am working on the Ionic project in Ubuntu 16.04 LTS, and now I am preparing for release. So I am running the following command: cordova build --release android But I am facing the following error: Error: Could not find gradle wrapper within Android SDK. Might need to ... .1 · I am having All Android versions from 2.1 (Eclair) to 7.1.1 (Nougat) Does anybody have any clue on this error?
asked Nov 29, 2019 alecxe 7.5k points
0 votes
1 answer 237 views
Problem : Currently I am learning Ionic I have recently created the ionic 2 project and also added the diagnostic cordova plugin as below: ionic plugin add cordova.plugins.diagnostic npm install --save @ionic-native/diagnostic and after that added the android platform as ... system to install the gradle wrapper. Please include gradle in your path, or install Android Studio How to fix above error?
asked Feb 26, 2020 mphil 2.3k points
1 vote
2 answers 385 views
Problem : I am very new to Ionic, I have recently started working on Ionic but I am facing below error: Runtime Error Uncaught (in promise): Error: Module build failed: Error: ENOENT: no such file or directory, open '/Users/stewart/Development/ionic/theWhoZoo/src/pages ... say they do match. import { MyRatingModel } from '../model/myratingModel'; How can I fix above error need Ionic expert help.
asked Apr 22, 2020 stewart 4k points
0 votes
1 answer 61 views
Problem : I am getting bellow error while I'm trying to setup an Android dev environment on Mac error:buildtools 24.0.2 requires java 1.8 or above. current jdk version is 1.7.
asked Oct 19, 2019 peterlaw 6.9k points
0 votes
1 answer 92 views
Problem : I have updated my Android Studio to 3.0 but now facing the lot of issues.. So now stopped on the point with below issue: Could not resolve all files for configuration ':applib:_lintClassPath'. > Could not find com.android.tools.lint:lint-gradle:26.1.0-alpha01. ... project :applib I am currently using latest gradle version as: "gradle-4.2.1-all.zip". Does anyone know what my issue can be?
asked Dec 17, 2019 alecxe 7.5k points
0 votes
2 answers 21 views
Problem: Android obesity is associated with a higher incidence of all the following except A) heart disease. B) diabetes mellitus. C) hypertension. D) cancer.
asked Apr 12, 2020 ArifulIslam 5.6k points
0 votes
1 answer 115 views
Problem : I am trying to compile an open source android project using gradel but facing following error no toolchains found in the ndk toolchains folder for abi with prefix: mips64el-linux-android
asked Nov 15, 2019 peterlaw 6.9k points
0 votes
1 answer 291 views
Problem: I was trying to start the ionic 3 but if I try to run the command 'ionic cordova run android' then I was facing below error. I tried many ways to fix this problem but I was unable to fix it: > cordova run android [13:30:46]  lint finished ... are my System details: Node       : v6.11.0 OS         : Windows 7 Xcode      : not installed ios-deploy : not installed ios-sim    : not installed
asked Aug 15, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 261 views
Problem: I am very new to Cordova and trying to use the Cordova 6.4.0 in my Windows 7 OS but I face below error if I tried to build an android version : “Cordova error: requirements check failed for jdk 1.8 or greater.” My Java Home variable is properly set to my JDK path but I unable to understand why am I facing above issue. Can some Cordova expert help me in fixing above error?
asked Jul 30, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 593 views
Problem : I am trying to install the visual studio code on the Ubuntu VM also I am using c++. But I am facing the following error message which is often covering my pages tab at the top and it is very frustrating: Please install [clang](http://clang.llvm. ... C++ support from the required packages. I am now completely confused have anyone ever faced the above error and have the solution on it ?
asked Dec 2, 2019 alecxe 7.5k points