简体   繁体   English

此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 6.0 不兼容。 - 反应原生

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

相关问题 React-Native Android Studio 项目构建失败,显示“此构建中使用了弃用的 Gradle 功能,使其与 Gradle 6.0 不兼容。” - React-Native Android Studio Project Build failed showing "Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0." React Native Task :app:processDebugResources FAILED 已弃用的 Gradle 功能在此构建中使用,使其与 Gradle 7.0 不兼容 - React native Task :app:processDebugResources FAILED Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0 此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 8.0 不兼容。 react-native 链接后 - Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. after react-native link “此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 7.0 不兼容。” -反应原生 - "Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0." -REACT-NATIVE 当我执行 gradle lint 时出现错误“此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 6.0 不兼容” - Error "Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0" When I do gradle lint Unity Android 构建错误 - 此构建中使用了已弃用的 Gradle 功能,使其与 Gradle 6.0 不兼容 - Error on Unity Android Build - Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0 此版本中使用了已弃用的 Gradle 功能,使其与 Gradle X 不兼容 - Deprecated Gradle features were used in this build, making it incompatible with Gradle X 此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 6 不兼容 - Deprecated Gradle features were used in this build, making it incompatible with Gradle 6 此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 5.0 不兼容 - Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0 此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 7.0 不兼容。 运行react-native时运行-android - Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. When running react-native run-android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM