'How can I downgrade the Gradle in NativeScript?
In my NativeScript project, after the last Gradle update, I can't build a new Bundle file (for Android release). This error is about the compatibility of some plugins with the new Gradle version.
I think if I could downgrade the Gradle version to the previous one, the build will succeed.
Is any way that I could do the Grandle downgrade on a NativeScript project?
Solution 1:[1]
Looks like there is a way to specify the version of gradle
to use in the project itself. But it is not documented anywhere.
I found these references in their code repository on github: https://github.com/NativeScript/nativescript-cli/search?q=runtimeGradleVersion
However, it is easy to set gradle
version outside the project in gradle.properties
file.
Linux
On typical Linux(Debian) nodejs|npm installation, the location of this file is:
/usr/local/lib/node_modules/nativescript/vendor/gradle-plugin/gradle/wrapper/gradle-wrapper.properties
For example, if you wish to specify the version 6.4
of gradle
, simply change the line from:
distributionUrl=https\://services.gradle.org/distributions/gradle-{{runtimeGradleVersion}}-bin.zip
to
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
Windows
The location of the file shall be under:
C:\Users\<username>\AppData\Roaming\npm\nativescript\vendor\gradle-plugin\gradle\wrapper\gradle-wrapper.properties
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |