我合并了我同事的工作,即使在看到所有 stackOverflow/github/... 解决方案后,我仍然遇到这个麻烦。 我的错误是这样的(它与Expo有关,但错误也可以更改为expo-permission错误或其他)
> Task :expo-location:compileDebugJavaWithJavac
C:\Users\flori\work\epitech\eip\tmp\app-takotak\TakOTak\node_modules\expo-location\android\src\main\java\expo\modules\location\LocationModule.java:520: error: cannot find symbol
return mPermissionsManager == null || !mPermissionsManager.hasGrantedPermissions(Manifest.permission.ACCESS_BACKGROUND_LOCATION);
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
Note: C:\Users\flori\work\epitech\eip\tmp\app-takotak\TakOTak\node_modules\expo-location\android\src\main\java\expo\modules\location\taskConsumers\GeofencingTaskConsumer.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
> Task :expo-location:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':expo-location:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 11s
441 actionable tasks: 2 executed, 439 up-to-date
<-------------> 0% WAITING
> IDLE
> IDLE
> IDLE
> IDLE
我的包json是这样的:
{
"main": "index.js",
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"web": "expo start --web",
"start": "react-native start",
"test": "jest"
},
"rnpm": {
"assets": [
"resources/fonts"
]
},
"dependencies": {
"@react-native-community/async-storage": "~1.12.0",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/masked-view": "0.1.10",
"@react-native-mapbox-gl/maps": "^8.1.0",
"@react-navigation/material-top-tabs": "^5.3.10",
"@react-navigation/native": "^5.8.10",
"@react-navigation/stack": "^5.12.8",
"expo": "^40.0.0",
"expo-facebook": "~9.1.0",
"expo-font": "~8.4.0",
"expo-splash-screen": "~0.8.1",
"expo-updates": "~0.4.1",
"jetifier": "^1.6.6",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "0.63.4",
"react-native-clear-cache": "^1.1.0",
"react-native-datepicker": "^1.7.2",
"react-native-eject": "^0.1.2",
"react-native-elements": "^3.0.1",
"react-native-gesture-handler": "~1.8.0",
"react-native-gifted-chat": "^0.16.3",
"react-native-hr": "^1.1.4",
"react-native-icon-badge": "^1.1.3",
"react-native-linear-gradient": "^2.5.6",
"react-native-maps": "0.27.1",
"react-native-multiple-select-list": "^1.0.4",
"react-native-paper": "^4.5.0",
"react-native-places-input": "^1.1.7",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area": "^0.5.1",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.16.1",
"react-native-slider": "^0.11.0",
"react-native-status-bar-height": "^2.6.0",
"react-native-swipe-cards-deck": "^0.2.14",
"react-native-tab-view": "^2.15.2",
"react-native-unimodules": "~0.12.0",
"react-native-vector-icons": "^7.1.0",
"react-native-web": "~0.13.12",
"react-navigation": "^4.4.0",
"reanimated-bottom-sheet": "^1.0.0-alpha.22",
"socket.io-client": "^3.0.4"
},
"devDependencies": {
"@babel/core": "~7.9.0",
"babel-jest": "~25.2.6",
"jest": "~25.2.6",
"react-test-renderer": "~16.9.0"
},
"jest": {
"preset": "react-native"
},
"private": true
}
我的 gradle-wrapper-properties 的内容:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
我正在与:
我已经尝试过的:
我的同事在 Android 上工作时知道该项目可以正常运行
如果您需要更多信息,请告诉我...
谢谢