admin管理员组文章数量:1122832
I'm trying to import the expo-location in my react-native app with expo.
I installed the library with this command:
npx expo install expo-location
And importing it:
import * as Location from 'expo-location'
but as soon as I add the import, the app breaks with the following error:
Error: Cannot find native module 'ExpoLocation', js engine: hermes [Component Stack]
My app.json file has
"plugins": [
[
"expo-location",
{
"locationAlwaysAndWhenInUsePermission": "Allow this app to use your location."
}
],
I'm trying to import the expo-location in my react-native app with expo.
I installed the library with this command:
npx expo install expo-location
And importing it:
import * as Location from 'expo-location'
but as soon as I add the import, the app breaks with the following error:
Error: Cannot find native module 'ExpoLocation', js engine: hermes [Component Stack]
My app.json file has
"plugins": [
[
"expo-location",
{
"locationAlwaysAndWhenInUsePermission": "Allow this app to use your location."
}
],
Share
Improve this question
asked Nov 22, 2024 at 10:19
doobeandoobean
2,1385 gold badges22 silver badges32 bronze badges
1
- Did you find a solution to this? I'm seeing the same problem. – NorseGaud Commented Nov 24, 2024 at 15:17
1 Answer
Reset to default 0you need to rebuild the project
eas build --profile development --platform android
more info here: https://docs.expo.dev/develop/development-builds/create-a-build/
本文标签: google maps api 3Cannot find native module 39ExpoLocation39js engine hermesStack Overflow
版权声明:本文标题:google maps api 3 - Cannot find native module 'ExpoLocation', js engine: hermes - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736304570a1932280.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论