【发布时间】:2023-04-04 23:05:01
【问题描述】:
在 react native 项目中,我们使用来自外部源的 java 模块,如下所示:
.
.
implementation project(':react-native-image-picker')
implementation project(':mapbox-react-native-mapbox-gl')
.
.
有时这些项目会导致以下警告过多:
The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018.
Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018
The specified Android SDK Build Tools version (26.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.0.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Update Build Tools version and sync project
Open File
Configuration 'provided' is obsolete and has been replaced with 'compileOnly'.
It will be removed at the end of 2018
The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018.
Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018
The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.0.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Update Build Tools version and sync project
Open File
我如何在构建项目时抑制此警告。令人讨厌和误导?
【问题讨论】:
标签: android react-native gradle