[英]Undefined isn't a function (evaluating 't.createContext(!1)') while running react native project
[英]Invalid sdkVersion while running react native project
我被困在 React Native 应用程序构建的初始部分。 我正在使用 create-react-native-app pkg 创建项目,当我通过“yarn run android”命令运行 android 版本应用程序时,出现以下错误:
Error: Invalid sdkVersion. Valid options are 10.0.0, 11.0.0, 12.0.0, 13.0.0, 14.0.0, 15.0.0, 16.0.0, 17.0.0, 18.0.0, 19.0.0, 20.0.0, 21.0.0, 22.0.0, 23.0.0, 24.0.0, 25.0.0, 7.0.0, 8.0.0, 9.0.0
这是一台windows机器。 Node v10.0.0、npm v5.6.0、Java 1.8 和 android studio 已经安装并且正在运行我通过 android studio 添加了各种 API ..目前我在 Sdk 平台上安装了 17-23-24-26。 我在真正的 android 设备上收到以下错误:
uncaught Error: console.error: React Native version mismatch.
Javascript version: 0.53.0
Native version: 0.52.0
Make sure that you have rebuilt the native code. If the problem persists try clearing the Watchman and packager caches with 'watchman watch-del-all && react-native start --reset-cache.
我没有找到解决方案...
打开您的 build.gradle 文件(位于 YOUR_PROJECT/android/app/build.gradle )并验证您的compileSdkVersion
编辑
如果您在 app.json 文件中使用 expo 检查sdkVersion
并确保它与 package.json 文件中的相同
在文件 app.json 中输入"sdkVersion": "36.0.0",
{
"expo": {
"name": "name-app",
"slug": "name-app",
"sdkVersion": "36.0.0",
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.