我正在构建一个React原生应用程序,当我第一次开始构建后,我完成了它的2屏幕,我创建了apk文件并安装在我的设备上,它打开完美没有任何崩溃.但现在我几乎已经完成了,它在闪屏后崩溃了,我正在将其安装在HTC Desire 10 Pro上,其中有Android 6.0。
我尝试的是debugg它,如果它有任何错误,通过打开JS调试器从博览会在我的Android工作室设备,但没有错误显示在屏幕上。你能帮我知道它有什么问题吗?是否需要删除package-lock.json?
这是我包.json:
`{
"name": "f1ian",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"@react-native-async-storage/async-storage": "1.17.11",
"@react-navigation/bottom-tabs": "^6.5.7",
"@react-navigation/drawer": "^6.6.2",
"@react-navigation/native": "^6.1.6",
"@react-navigation/stack": "^6.3.16",
"axios": "^1.4.0",
"expo": "~48.0.18",
"expo-constants": "~14.2.1",
"expo-status-bar": "~1.4.4",
"expo-web-browser": "^12.1.1",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native-gesture-handler": "~2.9.0",
"react-native-reanimated": "~2.14.4",
"react-native-safe-area-context": "4.5.0"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}`
这是我EAS文件:
{
"cli": {
"version": ">= 3.6.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
}
},
"preview": {
"distribution": "internal",
"ios": {
"resourceClass": "m1-medium"
}
},
"production": {
"ios": {
"resourceClass": "m1-medium"
}
}
},
"submit": {
"production": {}
}
}
app.json文件
{
"expo": {
"name": "f1ian",
"slug": "f1ian",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./App/assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./App/assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.f1ian.f1ian",
"versionCode": 1,
"adaptiveIcon": {
"foregroundImage": "./App/assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./App/assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "f5f4f061-dc1b-46a3-9474-4ce7f3c8dc36"
}
}
}
}
1条答案
按热度按时间qgelzfjb1#
问题是,在我构建的最后一个屏幕中,“Platform”不是从“react-native”导入的。所以,对于任何面临这个问题的人,看看进口。