[英]React Native: What's the difference between gradle references in gradle-wrapper.properties and build.gradle?
In my React Native app, I got an error about incompatibilities with gradle 6
, so I looked in my project structure to find out which version of gradle I was running in my project.在我的 React Native 应用程序中,我收到有关与gradle 6
不兼容的错误,因此我查看了我的项目结构以找出我在我的项目中运行的 gradle 版本。 I found this line in gradle-wrapper.properties
我在gradle-wrapper.properties
中找到了这一行
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
and this line in build.gradle
和build.gradle
中的这一行
classpath("com.android.tools.build:gradle:3.4.2")
What I Want To Know: What's the difference between the reference to gradle in each of these files?我想知道的:每个文件中对 gradle 的引用有什么区别? In other words, how is version 5.5 being used in my project, and how is 3.4.2 being used?换句话说,我的项目中如何使用 5.5 版本,以及如何使用 3.4.2?
distributionUrl
represents Gradel
Version where as classpath
represents Android Gradle plugin
version. distributionUrl
代表Gradel
版本,其中classpath
代表Android Gradle plugin
版本。
Gradel
vs Android Gradle plugin
: Reffer this difference between android gradle plugin and gradle Gradel
vs Android Gradle plugin
: Reffer this difference between android gradle plugin and gradle
Gradle is the build system. Gradle是构建系统。
You can use it with a lot of plugins .您可以将它与很多插件一起使用。 One of these is the plugin for Android .其中之一是Android 的插件。
It is used to provide processes and configurable settings that are specific to building and testing Android applications.它用于提供特定于构建和测试Android应用程序的流程和可配置设置。
For greater details and mapping of the above two type of versions refer the following URLs https://developer.android.com/studio/releases/gradle-plugin#updating-gradle https://developer.android.com/studio/releases/gradle-plugin#updating-plugin For greater details and mapping of the above two type of versions refer the following URLs https://developer.android.com/studio/releases/gradle-plugin#updating-gradle https://developer.android.com/studio/releases /gradle-plugin#update-plugin
I hope this answer has cleared your doubts.我希望这个答案已经消除了你的疑虑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.