React-Native "Could not get BatchedBridge"

Maybe you're like me. Maybe you've been working with ReactJS for a while and you want to play with React Native.

You download all of the appropriate tools to try and get a Android "Hello World" app working.

You create your project with react-native init HelloWorld and you run it with react-native run-android and it dies.

Could not get BatchedBridge, make sure your bundle is packaged correctly.

I don't know exactly what causes ☝️ but it's easy (albeit completely non-obvious) to fix. Luckily, you only have to follow these steps with a new project.

Create the android assets directory

mkdir android/app/src/main/assets

Manually start the React packager

react-native start --reset-cache

Manually force a build of the android build

curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"

Profit!

Now you should be able to do react-native run-android to launch your app.

One more thing

If you get any errors about hot-reloading and not connecting to the development console, just run adb reserve tcp:8081 tcp:8081 and then reload the app on the device.

All posts

  1. Scotty's extra-lean Thanksgiving
  2. Nothing else you do matters if you're fat
  3. A Dad's Guide to Snapchat
  4. The bullshit I put up with by not driving
  5. A restrospective on my wisdom teeth
  6. Waze Wants Me to Die
  7. The Time Kentucky Wanted a Submarine
  8. Phone calls from Mrs. Rothstein
  9. Ani DiFranco, Chinese food, and poor decisions
  10. The sun rises in the East
  11. Scotland, Day 5: The Wedding
  12. I've discovered the secret to true happiness
  13. What's happening at Bowman Field?
  14. More Bardstown Rd Pedestrian Safety Improvements
  15. My favorite video store
  16. Scenes from the weekend: Day of the Dead
  17. A good team needs good company culture
  18. College jobs
  19. I'm scared to run tomorrow
  20. The importance of teaching civil disobedience to our children
  21. That time I hit a kid with my car
  22. Stop blaming and fix the thing
  23. Basics of pedestrian safety
  24. The best (and worst) Halloween
  25. Reflections on Friends
  26. The Interview Where I Completely Froze
  27. Louisville needs to step up its bike-lane game
  28. A Farewell to a Server
  29. Gnocchi is a labor of love
  30. Middle School Shadow Economy
  31. Don't let your weaknesses define you
  32. Tales of woe in the college health center
  33. My favorite painting
  34. The oddity of passing time
  35. My kids are allowed to read anything they want
  36. The young fisherman
  37. Taking the lane
  38. The Soundtrack to Love
  39. Scotland, Day 4: Stirling
  40. An essential computer skill that most people dont know
  41. The nerdiest thing I ever did
  42. Tales of High School Theater
  43. Throwing things off other things
  44. I don't always know why I do things
  45. Passing an object to an ASP.NET MVC Controller
  46. Anger ruins everything
  47. Stories of love and hair
  48. Scotland, Day 3: Edinburgh
  49. Generating a client-side PDF with Javascript
  50. Vernacular: A digression
  51. Scotland, Day 2: Glasgow
  52. I have to enjoy my work
  53. Scotland, Day 1: Traveling
  54. Why I run
  55. My personal beard history
  56. My first nightmare
  57. Moms are tough as fuck
  58. Pedestrian safety improvements on Bardstown Rd.
  59. Free pass to Heaven
  60. The blue bus is calling us.
  61. Screaming with April and Kristin
  62. Viking Girl is growing up
  63. People who love you aren't afraid to call you out.
  64. You sometimes find terrible things on the side of the road
  65. The cure for teen angst is a river
  66. My son is me, but also not me.
  67. How to find out whos building stuff in Louisville
  68. Where's the new Bardstown Rd. Costco?
  69. My son, the mystery
  70. The first poet to blow my mind
  71. Focus on the things you did right
  72. The Saga of John the Baptist: Parts I III
  73. Camp, NOFX and Fire
  74. The magnetic poetry book
  75. Just temporarily disconnected
  76. Please don't ride your bike on the sidewalk
  77. I'm always afraid I'm in trouble
  78. My dog has many smells
  79. Perdido en la selva
  80. Not a wild child
  81. Weird things my kids have said
  82. When I realized I'm a grownup
  83. Crushes and more bad teenage poetry
  84. Me and High School Football
  85. The Mt. Lassen Motel, Red Bluff, CA
  86. The loneliest guy at Chilis
  87. Restaurant Reviews: The Bardstown
  88. My cultural knowledge void
  89. I want to go live in the woods sometimes
  90. The strangest domain name
  91. Sisi means aunt in Italian
  92. Debugging remote ASP.NET apps is super easy!
  93. The time before your child is born is an amazing and terrifying time.
  94. Email, poetry, madness and nostalgia
  95. The house on Klickitat Street
  96. That time I walked a little old Ecuadorian lady home
  97. All the kids I've hit
  98. Lets end the trope of the idiot dad
  99. A reminder about 4-way stops
  100. Ordering pizza in Germany
  101. The Mercy Underground
  102. My bicycle has a 115 dB air horn
  103. The only rule is work
  104. Restaurant Reviews: Havana Rumba (Highlands)
  105. Advice from my mom
  106. What I want in a job.
  107. The Ecuadorian toilet paper incident
  108. The budding photographer or why I cant hear Garth Brooks anymore
  109. Fear and loathing in Milwaukee
  110. Making food for the people you love
  111. Amanda Grimes, I'm sorry
  112. I am the dude with the hat
  113. The art of sneaking out
  114. Foo, bar, and other metasyntactic variables
  115. Freshman year in hell
  116. Vaccinate your damn kids, already
  117. Acts of rebellion
  118. The worst restaurant review ever
  119. I had my first migraine at 10
  120. Storage devices I have loved
  121. Bad teenage poetry #tbt
  122. Your partners problems are your problems
  123. Depression is like being in a loud room
  124. There is an art to asking questions
  125. I am a child of the BBS age
  126. Irrational fears
  127. The worst thing you could be in the 80's was poor
  128. My kids prefer video chats to phone calls
  129. A relationship is a choice
  130. My kids are terrible at knock knock jokes
  131. I gave my dad a haircut today
  132. I am a terrible traveler
  133. Hidden perks of being a blonde kid
  134. Indie music, pre-Internet
  135. Night swimming
  136. Zen and the art of resource editing
  137. Junior Developer, hard lessons learned
  138. Stories and thoughts
  139. I hate notifications
  140. The intimacy of smell
  141. My Geometry teacher was an alcoholic?
  142. You never know fear until you become a parent
  143. I'm tired of all the gun violence
  144. Gaming handhelds I have loved
  145. The glorious act of creation
  146. The overwhelming drive to feed a child.
  147. Why I give coding test during interviews
  148. Pitbull dogs are family
  149. word.camera
  150. Highs and Lows
  151. I ride a bike to be a better person
  152. Just because you're allowed to curse doesn't mean you have to
  153. "I don't know" is an acceptable answer
  154. Naked body surfing in Ecuador
  155. Go fuck yourself with your atom bomb
  156. Never complain about having enough time
  157. Journalism is Dead
  158. Deep is the lizard's eye #tbt
  159. TARC's cashless fare system screws poor people
  160. Writing begets writing
  161. How much do I really remember?
  162. I love the Idaho-Stop
  163. Scary decisions are the best decisions
  164. Never trust your inputs
  165. That one-off thing with the terrible name will be around forever
  166. The joy of difficulty
  167. Anger and regret
  168. I am not a great programmer
  169. Free-writing: Lissie, Live at Brighton
  170. Don't get too hung up on tools
  171. The urge to grow things
  172. I refuse to let this city beat me
  173. Let's talk about interruptions...again.
  174. Bardstown Rd Businesses That Don't Care About Pedestrians (part 1)
  175. Bikejoring or, How to Wear Out Your Dog as Fast as Possible
  176. Thoughts on wasting time
  177. Tragedy and Perspective
  178. On the idea of admiration
  179. The joy of waiting for things
  180. Advice for junior developers
  181. The 4 common ways cars try to kill me
  182. I ran a marathon
  183. The Madness of Saturday
  184. Keeping a daily work log
  185. A frustrating Web.config transformation error
  186. My first century
  187. How _not_ to compare file versions in C#
  188. Auto-incrementing build numbers in Visual Studio 2012
  189. "The definition of the report 'XYZ' is invalid."
  190. Side effects of bike commuting
  191. By the numbers: Coldest ride ever
  192. The difference between 'git fetch' and 'git pull'
  193. Freshman Lunch Shenanigans
  194. Getting an '__doPostBack is undefined' error in IE10
  195. Noticing an odd difference between different implementations of JSON.stringify
  196. How not to make a sale
  197. Prayer for the repose of the dead
  198. You Meet All Kinds of People Cycling
  199. So iBooks Have a Hidden Unique ID
  200. The Three Most Important Pieces of Information for a Kid
  201. 20 Years Later, I Still Can't Read Ramona the Pest
  202. In which I decide not to bother with New Year's Resolutions
  203. I kinda regret deleting my Instagram account
  204. Hacking my eating habits
  205. I have been a dad for 10 years
  206. The most uncomfortable training session ever
  207. Minor hiccup with Google Drive
  208. I love living in The Highlands
  209. A dark start to the day
  210. Renting an Apartment in Boston
  211. I think I need to get over myself a little bit
  212. Making a mobile site behave like an iOS app
  213. Picasa data API fun: Creating albums and uploading images
  214. SVN working copy is nested?
  215. My one, feeble attempt at being a cracker of software.
  216. My Own Personal Daily WTF v1
  217. Get on your bike. No excuses
  218. Pixel level drawing with the canvas element
  219. New Year's Resolutions
  220. How to write a very simple jQuery Plugin
  221. Must-Have Chrome Extensions
  222. Preserving the $ with jQuery.noConflict
  223. Can't load XRegExp twice in the same frame
  224. Converting a Unix timestamp to a real Postgres date
  225. HTML5 Data Attributes and jQuery.data()
  226. Memories Wrapped Up in Music
  227. A poem for our daughters
  228. Handling Windows API Callbacks in VB .NET
  229. My Favorite Explanation of clip: rect();
  230. Basics of QR Codes
  231. Adding/Deleting Events with the Google Calendar API
  232. Basic Authentication with Titanium.Network.HTTPClient
  233. Even better overriding the Firebug console in IE
  234. SQL Management Studio 2008 says Saving changes is not permitted.
  235. Revert to a previous revision with Subversion
  236. Catching Ajax errors with jQuery
  237. Fun with Vim movement commands
  238. Copying ADODB Recordsets Across Databases
  239. The Proxy Pattern in Javascript
  240. Snippet for popping up a jQuery UI Dialog
  241. A Caveat When Declaring Javascript Arrays
  242. With jQuery, Awesomeness Abounds
  243. One-liner to syntax check a Python script
  244. Coding for Doctors in Haiti
  245. Changing an application's favicon in CherryPy
  246. Localizing PHP with gettext
  247. Running a CherryPy app with Apache and mod_python
  248. Basics of the Alternative PHP Cache (APC)
  249. Converting an RFC 3339 date to a Python timestamp(plus an update to my Google Docs backup script)
  250. Flickr REST API Basics
  251. Short list of required web developer tools
  252. Getting the caption of an image attached to a WordPress post
  253. Simple tabbed HTML navigation buttons
  254. Making sure FireBug console calls don't bomb in IE
  255. You have to be able to talk to people
  256. Not breaking the rules, but still being a jerk
  257. Fear
  258. Growing Up Pyro
  259. Locking Down Facebook
  260. Automatically blocking Twitter spam accounts
  261. File modification date/times in Python
  262. SSH Tunneling: Taming the series of tubes
  263. My single-handed destruction of an Ecuadorian cafe
  264. Basic page routing with CherryPy
  265. Demystifying Python Decorators
  266. Handy VBScript ASP syntax shortcut
  267. Twitter Trends: Experimenting with Adobe Air
  268. Getting started with CherryPy
  269. Installing things on Linux is still a pain in the tuchus
  270. Facebook's OpenID Support: Much Improved!
  271. Basic Lighttpd Setup
  272. Be Safe and Don't Be a Jerk
  273. Facebook's OpenID Support: It's cute and all but...
  274. Basics of the PHP PCRE functions
  275. This Bash trick will make your brain explode
  276. Saving the world with PHP array functions
  277. The PalmOS Browser War That Never Was
  278. 8 years today (and 14 years last March)
  279. It's not hard to avoid sounding like a moran moron
  280. Premature Optimization less harmful than Immature Stupidity
  281. Where am I? Where are you?
  282. Using PrototypeJS with Greasemonkey
  283. Yes, it's a camera. No, it doesn't need film
  284. Backing up your Google Docs
  285. Twitter Search API: Make millions, wow your friends.
  286. The shapening
  287. Writing a simple Twitter-bot in PHP
  288. Event handling with PrototypeJS
  289. Sometimes being a dad is all too real
  290. A refugee from the world
  291. HTML Emails for fun and profit
  292. Javascript awesomeness with Prototype
  293. Regular expressions in VBA
  294. Manipulating PDF files with Visual Basic .NET
  295. Google Client Logins
  296. Your data is your life. Why aren't you protecting it?
  297. RAID basics
  298. My .vimrc file
  299. I'm just a little bit starstruck
  300. In which handiness ensues
  301. It begins
  302. Profiling PHP with APD
  303. Fun with Branching Merging
  304. Comment Engine: Round 2
  305. Comment Engine: Round 1
  306. Foray into the Google App Engine
  307. Un-befuddling OpenID
  308. From Javascript to PHP and Back Again
  309. The fun solution is not always the right one
  310. Good Lazy vs. Bad Lazy
  311. Search Replace with vim
  312. The Editor War
  313. Interviewing is hard and annoying
  314. Further Adventures of a Domino's CSR
  315. How I Single-Handedly Further Disgruntled a Disgruntled Domino's Assistant Manager
  316. Further Tales of a Disgruntled Domino's Manager in Training
  317. Domino's Nightly Stoner Encounter
  318. Most bizzare lack of tip on a delivery
  319. The Saga of an Uhappily-Married-Disgruntled Manager at Domino's: Part 1