最近编译一个老项目,要升级cordava 编译 gradle,
直接把platforms/android/cordova/lib/builders/GradleBuilder.js 里gradle-3.3-all.zip修改gradle-6.6-all.zip 就可以了
-
下载对应版本的gradle
下载后放到目录
yourproject/platforms/android/gradle/
2. 修改配置文件 D:/GitHub/JiYiXunLian/platforms/android/cordova/lib/builders/GradleBuilder.js
-
// var distributionUrl = process.env[‘CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL’] || ‘https//://services.gradle.org/distributions/gradle-3.3-all.zip’;
-
var distributionUrl = process.env[‘CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL’] || ‘../gradle-3.3-all.zip’;
3. 重新执行生成命令
cordova build android
或者直接修改gradle-6.6-all.zip
转载:
https://blog.csdn.net/bing103425/article/details/82895615 -
原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/tech/272963.html