在我的 React Native 应用程序中,我收到关于与 gradle 6
不兼容的错误,因此我查看了我的项目结构以找出我在我的项目中运行的 gradle 版本。我在 gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
build.gradle
中的这一行
classpath("com.android.tools.build:gradle:3.4.2")
我想知道的:这些文件中对 gradle 的引用有什么区别?也就是说,我的项目中5.5版本是怎么用的,3.4.2是怎么用的?
最佳答案
distributionUrl
表示 Gradel
版本,其中 classpath
表示 Android Gradle plugin
版本。
Gradel
与 Android Gradle 插件
:引用此 difference between android gradle plugin and gradle
Gradle是构建系统。
您可以将它与 a lot of plugins 一起使用.其中之一是 plugin for Android .
它用于提供特定构建和测试 Android 应用程序的流程和可配置设置。
有关上述两种版本的更多详细信息和映射,请参阅以下 URL https://developer.android.com/studio/releases/gradle-plugin#updating-gradle https://developer.android.com/studio/releases/gradle-plugin#updating-plugin
我希望这个答案能消除您的疑虑。
关于android - React Native : What's the difference between gradle references in gradle-wrapper. 属性和 build.gradle?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65904667/