Android APK shows blank screen after brief loading screen. Published project from Expo app works fine.
See original GitHub issueI’ve developed a project using CRNA. I published and that app works just fine. I’ve built an APK using expo build:android. Whether testing on my own device or an emulator, the APK app runs the loading screen very briefly and then goes to white instead of loading my Navigator Component.
App.js looks like this:
import { Provider } from 'react-redux';
import { store, persistor } from './src/redux/ConfigureStore';
import { Navigator } from './src/components/NavigationComponent';
import React from 'react';
import { PersistGate } from 'redux-persist/lib/integration/react';
import Loading from './src/components/LoadingComponent';
export default class App extends React.Component {
render() {
return (
<Provider store={store}>
<PersistGate loading={<Loading />} persistor={persistor} >
<Navigator />
</PersistGate>
</Provider>
);
}
}
Environment
Environment: OS: Windows 10 Node: 10.6.0 Yarn: 1.7.0 npm: 6.1.0 Watchman: Not Found Xcode: N/A Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5014246
Packages: (wanted => installed) expo: ^27.0.1 => 27.1.1 react: ^16.3.1 => 16.3.1 react-native: ~0.55.2 => 0.55.4
Diagnostics report: https://exp-xde-diagnostics.s3.amazonaws.com/savvycat-9c023f97-2652-4502-9f5d-1147f6da9212.tar.gz
package.json:
{
"name": "sphinx",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "~27.0.0",
"react-native-scripts": "1.14.0",
"react-test-renderer": "16.3.1"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^27.0.1",
"react": "^16.3.1",
"react-native": "~0.55.2",
"react-native-elements": "^0.19.1",
"react-native-hyperlink": "0.0.14",
"react-native-keyboard-aware-scroll-view": "^0.7.1",
"react-native-loading-spinner-overlay": "^0.5.2",
"react-native-modal-selector": "0.0.28",
"react-native-radio-buttons-group": "^1.0.7",
"react-native-sticky-header-footer-scroll-view": "^2.1.3",
"react-native-swipeout": "^2.3.6",
"react-navigation": "^2.11.2",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-logger": "^3.0.6",
"redux-persist": "^5.10.0",
"yarn": "^1.9.4"
},
"description": "This project was bootstrapped with [Create React Native App](https://github.com/react-community/create-react-native-app).",
"repository": {
"type": "git",
"url": "git+https://savvycat@bitbucket.org/savvycat/sphinx.git"
},
"author": "",
"license": "ISC",
"homepage": "https://bitbucket.org/savvycat/sphinx#readme"
}
Steps to Reproduce
- Publish app using
expo publish - Build out using
expo build:android - Install APK on device / emulator and open
Expected Behavior
I expect the APK standalone to function the same as the published app in Expo.
Actual Behavior
After briefly flashing to <Loading /> component (not always noticeably) screen goes to blank white.
Reproducible Demo
The working published app is at: https://expo.io/@savvycat/sphinx The APK is at: https://expo.io/artifacts/92985a3a-6d03-4adf-b0fa-c6459933b6df
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Related StackOverflow Question
This issue was closed prematurely.
The proposed solution does not help. Running that command creates a working app just like the one that you can access in dev or by looking at the published app.
The non-working version is coming from a built apk for android. It is not behaving in the same way as the app produced by the command suggest, the app in dev, or the app that is published to expo.
you can test how your app will work in prod by running:
expo start --no-dev --minifythis should help you to debug your error.