Ionic-cli: "Task 'wrapper' not found in root project 'android'."

Created on 14 May 2017  路  5Comments  路  Source: ionic-team/ionic-cli

https://forum.ionicframework.com/t/ionic-connectivity/88882

Probably nothing with the CLI but Cordova and Android.
(Note the different CLI versions)

Most helpful comment

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

All 5 comments

Yep, definitely Cordova/Android issue. I would mess with the installed SDK, Cordova versions, and Cordova Android platform versions, preferring the latest versions. That generally clears up weird build errors for me.

A Cordova issue here about this error.

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

Issue resolved by upgrading Gradle version to 3.5.

Following code works for me
just put following lines at app/build.gradle

task wrapper(type: Wrapper) { gradleVersion = '2.14.1' }

Was this page helpful?
0 / 5 - 0 ratings