Expo/React Native应用在物理设备上通过APK安装崩溃

huangapple go评论74阅读模式
英文:

Expo/React native application crash on physical device trough APK installation

问题

抱歉,由于您的请求,我将只翻译代码和相关部分,如下所示:

I'm currently building a React Native application with Expo. When running the application with the local server and the Expo Go application I dont have any issue. App run well on IOS and Android devices.

Now I'm trying to build an APK of the application for test purposes inside my team. To build it I followed [this documentation to use eas](https://docs.expo.dev/build-reference/apk/).

Now the apk install on the Android device but if I click on any button (they all trigger a `navigate` action onPress) the app crash instantly. I was using `TouchableOpacity` and I changed everyone of them to `Pressable` so the probleme does not come from the button. I'm wondering if it could come from the navigation system ?

Here is the dependencies of my project :

谢谢 🙏

英文:

<br />
I'm currently building a React Native application with Expo. When running the application with the local server and the Expo Go application I dont have any issue. App run well on IOS and Android devices. <br />
Now I'm trying to build an APK of the application for test purposes inside my team. To build it I followed this documentation to use eas. <br />

Now the apk install on the Android device but if I click on any button (they all trigger a navigate action onPress) the app crash instantly. I was using TouchableOpacity and I changed everyone of them to Pressable so the probleme does not come from the button. I'm wondering if i could come from the navigation system ? <br/>

Here is the dependencies of my project :

&quot;dependencies&quot;: {
    &quot;@react-native-async-storage/async-storage&quot;: &quot;^1.17.11&quot;,
    &quot;@react-navigation/native&quot;: &quot;^6.1.1&quot;,
    &quot;@react-navigation/native-stack&quot;: &quot;^6.9.6&quot;,
    &quot;@reduxjs/toolkit&quot;: &quot;^1.9.1&quot;,
    &quot;@rneui/base&quot;: &quot;^4.0.0-rc.7&quot;,
    &quot;@rneui/themed&quot;: &quot;^4.0.0-rc.7&quot;,
    &quot;expo&quot;: &quot;~47.0.13&quot;,
    &quot;expo-camera&quot;: &quot;~13.1.0&quot;,
    &quot;expo-file-system&quot;: &quot;~15.1.1&quot;,
    &quot;expo-location&quot;: &quot;~15.0.1&quot;,
    &quot;expo-mail-composer&quot;: &quot;~12.0.0&quot;,
    &quot;expo-media-library&quot;: &quot;~15.0.0&quot;,
    &quot;expo-status-bar&quot;: &quot;~1.4.2&quot;,
    &quot;jszip&quot;: &quot;^3.10.1&quot;,
    &quot;react&quot;: &quot;18.1.0&quot;,
    &quot;react-native&quot;: &quot;0.70.5&quot;,
    &quot;react-native-safe-area-context&quot;: &quot;4.4.1&quot;,
    &quot;react-native-screens&quot;: &quot;~3.18.0&quot;,
    &quot;react-native-uuid&quot;: &quot;^2.0.1&quot;,
    &quot;react-navigation&quot;: &quot;^4.4.4&quot;,
    &quot;react-navigation-stack&quot;: &quot;^2.10.4&quot;,
    &quot;react-redux&quot;: &quot;^8.0.5&quot;,
    &quot;redux&quot;: &quot;^4.2.0&quot;,
    &quot;redux-persist&quot;: &quot;^6.0.0&quot;
}

Thank you 🙏

答案1

得分: 1

终于在这里找到了答案 here <br/>
我忘记在我的应用程序根目录下添加一个 GestureHandlerRootView 😅。

英文:

Finally found the answer here <br/>
I forgot a GestureHandlerRootView at the root of my application 😅.

huangapple
  • 本文由 发表于 2023年2月18日 16:28:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/75492106.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定