You edited the correct file? It's not a js file.
ionic-project/platforms/android/gradle/wrapper/gradle-wrapper.properties
You will see
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
Change to
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
If this doesn't work try to install another cordova android platform:
cordova platform rm android
cordova platform add android@7.1.1
Or with 7.0.0 version, I recommend the 6.3.0 for legacy compatible.
The answer was to remove all installed platforms and delete plugin and platform folder. Re-add platform. Thanks to @Guillem Perez.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.