简体   繁体   English

Expo Go 在 Android 上测试应用程序时应用程序崩溃

[英]Expo Go App just crashes when testing app on Android

I'm developing React Native app and trying to test my app on Android in Expo Go. In my app there are 2 screens A and B. When loading screen A it's ok but when I try to navigate to screen B by pressing button, the Expo Go just crashes and I even have no possibility to view logs and even see the next screen.我正在开发 React Native 应用程序并尝试在 Expo Go 中的 Android 上测试我的应用程序。在我的应用程序中有 2 个屏幕 A 和 B。加载屏幕 A 时没问题,但是当我尝试通过按下按钮导航到屏幕 B 时, Expo Go 只是崩溃,我什至无法查看日志,甚至无法看到下一个屏幕。 On iOS it's fine but on every Android device it's impossible to view error log for me.在 iOS 上没问题,但在每台 Android 设备上,我无法查看错误日志。 How can I see error log, stacktace and so on when Expo Go crashes on Android? Expo Go crash on Android 如何查看错误日志,stacktace 等? Thanks.谢谢。

Long story short, Android is super strict on bad style values.长话短说,Android 对不良风格值非常严格。

For me, I had a style like...对我来说,我的风格是……

const style = StyleSheet.create({
    textItem: {
        fontSize: 15,
        lineHeight: '0em',  // This was the issue, I guess its not a valid value. I changed it to 0 and it worked.
    }
});

I also had a few other issues where I was doing something like...我还有其他一些问题,我正在做类似的事情......

 justifyContent: 'start' // not a correct value. Changed to 'flex-start'

iOS would load fine but android would quit immediately. iOS 会加载正常,但 android 会立即退出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Expo React Native 应用程序在 Android 上崩溃,但在 Expo 上运行 Go - Expo React Native app crashes on Android but works in Expo Go 在真实设备上测试时Android应用程序崩溃 - Android app crashes when testing on a real device 每当我 go 进入活动时,该应用程序就会崩溃 - The app just crashes whenever I go into the activity Expo MediaLibrary.getAssetsAsync() 使 Android 上的应用程序崩溃 - Expo MediaLibrary.getAssetsAsync() crashes the app on android Expo Go 应用程序在 Android 上崩溃 | 数字文字后不允许直接使用标识符 - Expo Go app crashes on Android | No identifiers allowed directly after numeric literal Android 6权限-在“设置”中切换权限并返回应用时崩溃 - Android 6 permission - Crashes when toggling permission in Setting and go back to app 尝试转到新的Intent时Android App崩溃 - Android App crashes when trying to go to a new Intent Android应用程序崩溃-Json为空 - Android app just Crashes- Json is Null 带有 React Navigation 5 的 Expo React Native 应用程序在从 Navigator 触摸初始屏幕时在 Android 上崩溃 - Expo React Native app with React Navigation 5, crashes on Android when touching initial screen from Navigator Expo 应用程序在尝试使用按钮从一个屏幕导航到另一个屏幕时仅在 Android 崩溃 - Expo app crashes only in Android when trying to navigate from a screen to the other using a Button
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM