[英]Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. - React native
When i installed React Native WebView当我安装React Native WebView
After installation when i run react-native run-android
showing error安装后运行
react-native run-android
显示错误
Task :app:transformDexArchiveWithDexMergerForDebug FAILED
任务 :app:transformDexArchiveWithDexMergerForDebug 失败
Deprecated Gradle
features were used in this build, making it incompatible with Gradle 6.0
.此版本中使用了已弃用的
Gradle
功能,使其与Gradle 6.0
不兼容。 Use '--warning-mode all' to show the individual deprecation warnings.使用“--warning-mode all”来显示单个弃用警告。 See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings 163 actionable tasks: 28 executed, 135 up-to-date
请参阅https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings 163 个可操作任务:28 个已执行,135 个最新
Package.json包.json
"@react-native-community/async-storage": "^1.8.1",
"@react-native-community/masked-view": "^0.1.7",
"@react-navigation/native": "^5.1.3",
"native-base": "^2.13.12",
"npm-check-updates": "^4.1.0",
"react": "16.13.1",
"react-native": "0.62.0",
"react-native-gesture-handler": "^1.6.1",
"react-native-media-controls": "^1.1.1",
"react-native-paper": "^3.6.0",
"react-native-reanimated": "^1.7.1",
"react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^2.4.0",
"react-native-track-player": "^1.2.2",
"react-native-video": "^5.1.0-alpha6",
"react-native-webview": "^9.0.2",
"react-navigation": "^4.3.5",
"react-navigation-drawer": "^2.4.9",
"react-navigation-stack": "^2.3.9",
"react-navigation-tabs": "^2.8.9",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-persist": "^6.0.0"
Perhaps your app has a method of 64K or more.也许您的应用程序具有 64K 或更多的方法。 You can add this in
android/app/build.gradle
你可以在
android/app/build.gradle
添加这个
android{
defaultConfig{
.......
multiDexEnabled true
}
}
dependencies {
...
def multidex_version = "2.0.1"
implementation 'androidx.multidex:multidex:$multidex_version'
}
MainApplication.java主应用程序
public class MainApplication extends MultiDexApplication implements ReactApplication {
恢复上次添加的包或资产文件(例如:运行react-native run-android
时有时图像损坏和错误)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.