Reputation: 744
When I try to run ionic 2 application
ionic run android
It stops leaving an error as below. Please help me to fix this problem
FAILURE: Could not determine which tasks to execute.
* What went wrong:
Task 'wrapper' not found in root project 'android'.
* Try:
Run gradle tasks to get a list of available tasks.
BUILD FAILED
Total time: 1.435 secs
Error: /usr/share/gradle/bin/gradle: Command failed with exit code 1
My ionic info is
Cordova CLI: 7.0.0
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.2
Node Version: v7.4.0
Xcode version: Not installed
Platform list is
Installed platforms:
android 6.2.3
Available platforms:
blackberry10 ~3.8.0 (deprecated)
browser ~4.1.0
ubuntu ~4.3.4 (deprecated)
webos ~3.7.
Upvotes: 2
Views: 2239
Reputation: 958
Go to the site https://gradle.org/releases, download the lastest version in some folder. Unpack the zipfolder and create a symbolic link: sudo ln -sf /PATH-TO-BIN-FOLDER/gradle /usr/bin/gradle
Upvotes: 1
Reputation: 1
are you using Jessie Debian or ubuntu this will be right,
go to https://gradle.org/install and download the version 4.0 of gradle,
mkdir opt/gradle
unzip -d /opt/gradle gradle-4.0-bin.zip
/* I using Debian Jessie then I do :
if [ -d "/opt/gradle/gradle-4.0" ]; then
export GRADLE_HOME="/opt/gradle/gradle-4.0"
PATH="$PATH:$GRADLE_HOME/bin"
fi
open another terminal and type gradle -v
return to cordova project and type cordova build
Upvotes: 0
Reputation: 174
I found the gradle executable in android-studio-path/gradle/bin and included it to my $PATH.
Upvotes: 1
Reputation: 744
Just figured out the problems,
I just remove Gradle and run below code
sudo apt-get remove gradle
And ran
ionic run android
Its install Gradle itself, The problem was solved
Upvotes: 3