• Register
0 votes
1.1k views

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

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 73 views
73 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 164 views
164 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 mphil 2.3k points
1 vote
2 answers 164 views
164 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 stewart 4k points
0 votes
1 answer 50 views
50 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 80 views
80 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