React-Native fill dependencies delete pit of third party open source components

Today, encountered a problem: Download the react-native-webview of open source components, but encountered problems in Android, the compiler does not pass, I want to remove this component, and then write other functions, later adding the map feature, but found You can not delete a clean, android and ios are native compilation fails. Studies on this issue, the method will now uninstall the following:

npm uninstall -s -D -O react-native-webview复制代码

Android into the directory and find the file setting.gradle

删除所有有关该包的依赖复制代码

Then proceed to the next android / app directory, open build.gradle

删除所有有关该包的依赖复制代码

Open android / app / src / main / java / com / package name /MainApplication.java,

删除所有有关该包的依赖复制代码

Then run the terminal

npm install
react-native run-android复制代码

success! ! !

Reproduced in: https: //juejin.im/post/5ceb3f38f265da1b6c5f532b

Guess you like

Origin blog.csdn.net/weixin_33716557/article/details/91459243