问题:
在使用react-navigation做页面导航运行react-native run-android编译时出现“Could not find method compileOnly for arguments”的错,
我使用的版本信息如下: "react-native": "^0.55.4" "react-navigation": "^3.11.0" "react-native-gesture-handler":"^1.2.1"
报错见如下截图:

解决方案:
将node_modules\react-native-gesture-handler\android\build.gradle中依赖compileOnly改为compile。重新编译问题解决。

React Native导航编译报错解决方案
博客指出使用react-navigation进行页面导航,运行react-native run-android编译时出现‘Could not find method compileOnly for arguments’错误。解决方案是将node_modules\\react-native-gesture-handler\\android\\build.gradle中依赖compileOnly改为compile,重新编译即可解决问题。
2013

被折叠的 条评论
为什么被折叠?



