rn-wechat icon indicating copy to clipboard operation
rn-wechat copied to clipboard

给gradlew开放权限还是编译失败

Open ypf168326 opened this issue 7 years ago • 7 comments

按照你的教程,开启了gradlew权限,还是报错,我都把整个项目权限都改成777了,还是不行。

Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

ypf168326 avatar Oct 09 '17 03:10 ypf168326

我运行ios也是失败的...

flyinghawker avatar Oct 09 '17 03:10 flyinghawker

到你的android/app/build/outputs/apk目录下看看有没有apk生成,如果有,那就没问题

yubo725 avatar Oct 09 '17 04:10 yubo725

iOS运行失败的话,用xcode打开ios工程,然后在xcode里调试看看

yubo725 avatar Oct 09 '17 04:10 yubo725

@yubo725 我看过没有生成apk文件,你项目不是依赖四个其他库吗?我都按照你说都下载安装好了,我看了一下本地确实也下载成功了,但是我运行react-native link只看到三个库关联了,还少一个QRCode库

yupengfeideMac-mini:RNWeChat-master yupengfei$ react-native link
Scanning 484 folders for symlinks in /Users/yupengfei/Desktop/RNWeChat-master/node_modules (4ms)
rnpm-install info Android module @remobile/react-native-toast is already linked 
rnpm-install info iOS module @remobile/react-native-toast is already linked 
rnpm-install info Android module react-native-camera is already linked 
rnpm-install info iOS module react-native-camera is already linked 
rnpm-install info Android module react-native-image-crop-picker is already linked 
rnpm-install info iOS module react-native-image-crop-picker is already linked 

ypf168326 avatar Oct 09 '17 09:10 ypf168326

应该是你npm安装得有问题,把node_modules目录删除再重新npm install一遍,还有问题的话加QQ群:419213248一起讨论

yubo725 avatar Oct 09 '17 09:10 yubo725

@yubo725 好的,我试试。

ypf168326 avatar Oct 09 '17 09:10 ypf168326

@yubo725 我刚重新安装了npm,安装npm install没问题,但是安装npm install --save react-navigation有问题。

yupengfeideMac-mini:RNWeChat-master yupengfei$ npm install --save react-navigation
npm WARN [email protected] requires a peer of react@>=15.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^0.14.9 || ^15.3.0 but none is installed. You must install peer dependencies yourself.

+ [email protected]
added 16 packages, updated 54 packages and moved 8 packages in 12.858s

ypf168326 avatar Oct 09 '17 10:10 ypf168326