Реакция ошибки несоответствия собственной версии - Экспо - PullRequest
2 голосов
/ 04 мая 2020

Получение следующего сообщения при запуске проекта и последующем запуске эмулятора Xcode:

"React Native version mismatch.

Javascript version: 0.59.10
Native version: 0.61.4-undefined

..."

Мой пакет. json:

{
    "name": "tinder-react-native",
    "description": "Tinder React Native clone",
    "version": "0.2.0",
    "author": "Steven Persia",
    "licence": "MIT",
    "homepage": "https://github.com/stevenpersia/tinder-react-native",
    "private": true,
    "scripts": {
        "lint": "eslint ./components ./containers --fix",
        "start": "node node_modules/react-native/local-cli/cli.js start",
        "test": "jest"
    },
    "dependencies": {
        "expo": "^37.0.8",
        "react": "16.6.3",
        "react-native": "^0.59.10",
        "react-native-card-stack-swiper": "^1.1.0",
        "react-native-gesture-handler": "^1.0.12",
        "react-navigation": "^3.0.9"
    },
    "devDependencies": {
        "babel-jest": "^24.8.0",
        "eslint": "^6.6.0",
        "eslint-config-standard": "^14.1.0",
        "eslint-plugin-import": "^2.18.2",
        "eslint-plugin-node": "^10.0.0",
        "eslint-plugin-promise": "^4.2.1",
        "eslint-plugin-react": "^7.16.0",
        "eslint-plugin-react-native": "^3.8.1",
        "eslint-plugin-standard": "^4.0.1",
        "jest": "^24.8.0",
        "metro-react-native-babel-preset": "0.51.1",
        "react-test-renderer": "16.6.3"
    },
    "jest": {
        "preset": "react-native",
        "transform": {
            "node_modules/react-native/.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
        }
    },
    "rnpm": {
        "assets": [
            "./assets/fonts/"
        ]
    }
}

Мое приложение. json (у него не было sdkVersion):

{
  "name": "tinderReact",
}

Кто-нибудь знает, что здесь происходит, и может мне помочь? Это очень расстраивает. Некоторая информация: у меня не установлен сторож. Я не знаю, что делать, поскольку в приложении не было sdkVersion. json для начала.

1 Ответ

0 голосов
/ 04 мая 2020
I was also struggling with this. 

Somebody has added this https://bintray.com/weimob/maven/react-native/0.55.3 and it will break all React Native Android builds that specify jcenter() in project's repositories.

To avoid this issue, you should force React Native version in android/app/build.gradle file like this compile ("com.facebook.react:react-native:0.52.0") { force = true }. Change 0.52.0 to version you're using.

https://github.com/facebook/react-native/issues/19259#issuecomment -389064401

Я нашел этот Google, и я думаю, что это может помочь вам.

С уважением

...