工作时仓促在有道云写的直接copy来了,我觉得可以看懂。
问题是:
Could not find method compile() for arguments [project ':RCTWeChat'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
1. 确定 npm install react-native-wechat --save
one.png2. 确定 android/settings.gradle:
two.pngthree.png(虽然 ,link 后 有 include ':react-native-wechat', 但是 issuse: https://github.com/yorkie/react-native-wechat/issues/225)
3.确定 android/app/build.gradle
four.png4.确定 proguard-rules.pro:
five.png5. 确定 MainActivity.java or MainApplication.java:
six.png6. 确认 wxapi / WXPayEntryActivity (我使用其支付功能)
seven.png eight.png7. 确认 AndroidManifest.xml:
night.png当我build gradle时:
ten-1.pngor react-native run-android 时
ten-2.pngsolve:: 认真看了一下后发现了部题所在。(https://github.com/yorkie/react-native-wechat/issues/257)
solve.png找到问题了(build.gradle是【android/app/build.gradle】 而我是 【android/build.gradle】) thanks 大家,我是安卓小白。
网友评论