React Native app shows 'index.android.bundle' error when setting targetSdkVersion to 28
See original GitHub issue🐛 Bug Report
After I updated my targetSdkVersion
from 27 to 28, I ran react-native run-android
connected to an emulator and was presented with a screen stating “Unable to load script from assets ‘index.android.bundle’. Make sure your bundle packaged correctly or you’re running a package server.”
To Reproduce
From a new or existing (functioning) React Native app, change the targetSdkVersion
in android/build.gradle
file to 28
.
Expected Behavior
The app loads as it did before.
Environment
React Native Environment Info:
System:
OS: Linux 4.4 Ubuntu 16.04.5 LTS (Xenial Xerus)
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Memory: 17.71 GB / 31.87 GB
Shell: 4.3.48 - /bin/bash
Binaries:
Node: 8.15.0 - ~/.nvm/versions/node/v8.15.0/bin/node
Yarn: 1.12.3 - /usr/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.15.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 23, 24, 25, 26, 28
Build Tools: 25.0.0, 28.0.3
System Images: android-28 | Intel x86 Atom_64
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.58.3 => 0.58.3
npmGlobalPackages:
react-native-cli: 2.0.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Unable to load script from assets index.android.bundle
It's a bug in the recent version. You have to use the previous version by using react-native init ProjectName --version=0.55.4 The problem ...
Read more >React native build release error: uncompiled PNG file passed ...
Error : uncompiled PNG file passed as argument. Must be compiled first into .flat file.. error: failed parsing overlays. DO NOT use android....
Read more >Addressing common errors in React Native - LogRocket Blog
Solution 1: Package the bundle correctly. All of your app's JavaScript is bundled into the index.android.bundle file.
Read more >react native compilesdkversion is not specified. please add it ...
I solved this issue by clearing the cache and re-install react-native-webview. The steps shown as below: reset cache. npm install react-native-webview --save.
Read more >React Native Upgrade Helper
Show me how to upgrade! ... You can also provide your app name by clicking the settings icon on the top ... 16,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
AndroidManifest.xml file change as following
Duplicate of #22024.