简体   繁体   English

React Native:gradle-wrapper.properties 中的 gradle 引用和 build.gradle 有什么区别?

[英]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.gradlebuild.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.

相关问题 React Native:build.gradle 文件中的 Android Gradle 插件和 ZE84E30B9390CDB64DB6DB2C9D 有什么区别? - React Native: what's the difference between Android Gradle Plugin in build.gradle file and Android Studio? Gradle 版本和 gradle-wrapper.properties - Gradle version and gradle-wrapper.properties React Native和build.gradle - React Native and build.gradle Android Studio中gradle-wrapper.properties的用途是什么? - What is the purpose of gradle-wrapper.properties in Android Studio? "build.gradle(项目)和 build.gradle(模块)之间的区别" - Difference between build.gradle (Project) and build.gradle (Module) 找不到gradle \\ wrapper \\ gradle-wrapper.properties - Cannot find gradle\wrapper\gradle-wrapper.properties 在 Android Studio 中找不到 \gradle-wrapper.properties - \gradle-wrapper.properties not found in Android Studio Gradle-Wrapper.Properties 不存在(Cordova) - Gradle-Wrapper.Properties does not exist (Cordova) useLibrary的原理与build.gradle中的compile files('')的原理有什么区别? - What's the difference between principles of useLibrary and compile files('') in build.gradle? 关于gradle.properties,settings.gradle,gradle-wrapper.properties和local.properties的一些说明 - Some light on gradle.properties, settings.gradle, gradle-wrapper.properties and local.properties
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM