当我尝试使用react-native run-android
它运行我的项目时,它显示了这个错误:error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment.
此外,当我从 Android Studio 运行时,它会显示此错误:ERROR: Android dependency 'org.webkit:android-JSC:r245459' is set to compileOnly/provided which is not supported
这是我的 package.json 文件:
{
"name": "churchmap",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"react": "16.9.0",
"react-native": "0.61.1"
},
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/runtime": "^7.5.0",
"@react-native-community/eslint-config": "^0.0.3",
"babel-jest": "^24.1.0",
"jest": "^24.1.0",
"metro-react-native-babel-preset": "^0.51.1",
"react-test-renderer": "16.8.1"
},
"jest": {
"preset": "react-native"
}
}
我不明白为什么不工作
我用 maven { url ' https://www.jitpack.io ' } 替换了 maven { url ' https://jitpack.io ' },然后我下载了 jetifier npm install --save-dev jetifier 并运行了 npx jetifier。那解决了我的问题:)
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句