react-native 链接找不到我的 MainApplication.java 文件 [英] react-native link can't find my MainApplication.java file
问题描述
每次我尝试 react-native link
一个新库时,我都会收到相同的错误消息.这里是 react-native-video.
Every time I try to react-native link
a new library, I get the same error message. Here it is for react-native-video.
rnpm-install info 链接 react-native-video android 依赖rnpm-安装错误!链接时出了点问题.错误:ENOENT:没有这样的文件或目录,打开/Users/Me/Projects/myProject/android/app/src/main/java/com/companyName/appName/MainApplication.java"请在此处提交问题:https://github.com/facebook/react-native/issues
我的 MainApplication.java 文件的实际位置是
The actual location of my MainApplication.java file is
./android/app/src/main/java/com/appName/MainApplication.java
区别在于 React Native Link 在路径中包含了公司名称",这与我的项目不匹配.
The difference is that React Native Link is including "company name" in the path, which doesn't match my project.
我该如何解决这个问题?
How can I fix this?
推荐答案
我查看了一些主题并找到了解决方案,您可以尝试:
I looked over some topic and found solution, you can try with:
<代码>npm install --save-dev babel-plugin-module-resolver然后添加您的 npm 安装包 &再次反应原生链接.
npm install --save-dev babel-plugin-module-resolver
and then add your npm install package & react-native link again.
祝你好运
这篇关于react-native 链接找不到我的 MainApplication.java 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!