A. Ensure your device has enough storage space available. Clear cache and unnecessary files to free up space. Go to Settings > Storage > Cached data and clear it.
B. Close other applications running in the background to free up RAM. You can do this by accessing the recent apps menu and swiping away apps you are not using.