gpt4 book ai didi

android - 预期类( 'com.google.android.gms.location.FusedLocationProviderClient' 的声明)在 native react 中

转载 作者:行者123 更新时间:2023-12-05 02:26:00 25 4
gpt4 key购买 nike

这之前工作正常。可能未处理的 promise 拒绝(id:0):错误:调用 native 方法时遇到异常:在模块 ExpoLocation 上执行导出方法 getLastKnownPositionAsync 时发生异常:找到接口(interface) com.google.android.gms.location.FusedLocationProviderClient,但需要类('com.google.android.gms 的声明.location.FusedLocationProviderClient'

我已将以下内容添加到我的 build.gradle 文件中:

implementation 'com.google.android.gms:play-services-location:16.0.0'

package.json 文件:

{
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"appcenter": "4.4.5",
"appcenter-analytics": "4.4.5",
"appcenter-crashes": "4.4.5",
"expo": "~41.0.1",
"expo-location": "~12.0.4",
"expo-splash-screen": "~0.10.2",
"expo-status-bar": "~1.0.4",
"expo-updates": "~0.5.4",
"jwt-decode": "^2.2.0",
"lottie-react-native": "^5.0.1",
"radio-buttons-react-native": "^1.0.4",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "~0.63.4",
"react-native-cli": "^2.0.1",
"react-native-code-push": "^7.0.5",
"react-native-elements": "^3.4.1",
"react-native-fast-image": "^8.5.11",
"react-native-geo-fencing": "^0.1.0",
"react-native-geocoding": "^0.5.0",
"react-native-geolocation-service": "^5.3.0-beta.3",
"react-native-gesture-handler": "^1.10.3",
"react-native-google-places-autocomplete": "^2.2.0",
"react-native-looped-carousel": "^0.1.13",
"react-native-maps": "0.27.1",
"react-native-push-notification": "^8.1.1",
"react-native-razorpay": "^2.2.9",
"react-native-reanimated": "^2.1.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "^3.1.1",
"react-native-secure-storage": "^0.1.2",
"react-native-share": "^7.2.1",
"react-native-simple-toast": "^1.1.3",
"react-native-svg": "^12.3.0",
"react-native-unimodules": "~0.13.3",
"react-native-version-check": "^3.4.3",
"react-native-web": "~0.13.12",
"react-native-webp-format": "^1.1.2",
"react-navigation": "^4.4.4",
"react-navigation-drawer": "^2.7.1",
"react-navigation-stack": "^2.10.4",
"react-navigation-tabs": "^2.11.2",
"rn-fetch-blob": "^0.12.0"
},
"devDependencies": {
"@babel/core": "^7.9.0"
},
"private": true,
"name": "test",
"version": "1.0.0"
}

最佳答案

此问题源于 google play 服务在最新版本中更新了一些内容。 https://developers.google.com/android/guides/releases#october_13_2022

我能够通过在 android/build.gradle 文件中将我的 google play 服务版本锁定为 20.0.0 来解决这个问题。我们之前使用的是“+”。 See image here for the change .

关于android - 预期类( 'com.google.android.gms.location.FusedLocationProviderClient' 的声明)在 native react 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74085319/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com