在我运行expo build:android
后,我成功构建了apk文件,但是当我尝试在许多设备中安装它时,它没有被安装,它显示“App not installed”错误[image]。
这是我的package.json:
{
"name": "some-app",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"dependencies": {
"axios": "^0.18.0",
"expo": "^31.0.2",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",
"react-navigation": "^3.1.2",
"react-redux": "^6.0.0",
"redux": "^4.0.1",
"redux-persist": "^5.10.0"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0"
}
}
问题出在我的app.json中的android packager名称中
就像这样:
"package": "com.<myName>.<appName>"
我用appName替换了myName:
"package": "com.<appName>.<appName>"
它像魔术一样工作,我能够在多个设备上成功构建和安装应用程序