我的应用程序确实需要一些帮助。我可以使用“eas build -p android --profile Preview”成功构建我的 React Native 应用程序 apk,但应用程序在 Android 设备上安装后立即崩溃。我尝试用一个全新的博览会项目重建应用程序几次,只添加了几个页面,但构建后它仍然崩溃。
没有错误或警告,该应用程序在博览会模拟器以及物理设备上的博览会模拟器上运行良好。它只会在构建并安装在真实设备上后才会崩溃。
我连接设备以使用logcat监控日志,但我只得到以下日志,这并没有给我任何关于我的代码中的错误的具体线索:
08-23 15:22:29.036 6078 6130 E AndroidRuntime: Process: com.oki.okieventapp, PID: 6078
08-23 15:22:29.055 1173 6146 W ActivityManager: crash : com.oki.okieventapp,10352
08-23 15:22:29.058 1173 1259 W ActivityTaskManager: Force finishing activity com.oki.okieventapp/.MainActivity
这是我的package.json:
{
"name": "eventapp0828",
"version": "1.0.0",
"main": "expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"@react-navigation/bottom-tabs": "^6.6.1",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26",
"@react-navigation/stack": "^6.3.29",
"contentful": "^10.8.7",
"expo": "~51.0.28",
"expo-status-bar": "~1.12.1",
"react": "18.2.0",
"react-native": "0.74.5"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}
这是我的app.json:
{
"expo": {
"name": "Oki Event App",
"slug": "eventieapp",
"version": "1.0.4",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.oki.okieventapp"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/splash.png",
"backgroundColor": "#ffffff"
},
"package": "com.oki.okieventapp",
"versionCode": 8
},
"web": {
"favicon": "./assets/splash.png"
}
}
}
有人可以帮我解决这个应用程序崩溃问题吗?预先感谢您!🥹
您可以尝试安装这些软件包。您的应用程序也应该在构建模式下正常工作。 反应本机手势处理程序反应本机屏幕反应本机安全区域上下文