0
votes

When i installed React Native WebView

After installation when i run react-native run-android showing error

Task :app:transformDexArchiveWithDexMergerForDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. 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

Package.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"
2

2 Answers

0
votes

Perhaps your app has a method of 64K or more. You can add this in 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 {
0
votes

Revert last added package OR assets files (Like: Sometime images corrupted & error while run react-native run-android)