could not find method compileOnly

问题:

在使用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"

报错见如下截图:

could not find method compileOnly_第1张图片

解决方案:

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

could not find method compileOnly_第2张图片

你可能感兴趣的:(React,Native)