3

I'm starting an app from Re-Natal template (didn't change it; project.clj from https://github.com/drapanjanas/re-natal/blob/master/resources/project.clj).

Then I ran

react-native start
re-natal use-android-device avd
re-natal use-figwheel
lein figwheel android
react-native run-android

The app runs ok on the device, but the repl stays at Prompt will show when Figwheel connects to your application, and the code won't reload. The same happens on a real android device.

I'm also reloading the app after it starts.

Am I missing something?


Update: output from react-native run-android

Installing APK 'app-debug.apk' on 'Nexus_5X_API_28(AVD) - 9' for app:debug
Installed on 1 device.

BUILD SUCCESSFUL

Total time: 36.329 secs

This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Running /home/ale/Android/Sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:8081
Starting the app on emulator-5554 (/home/ale/Android/Sdk/platform-tools/adb -s emulator-5554 shell am start -n com.renatal/com.renatal.MainActivity)...
Starting: Intent { cmp=com.renatal/.MainActivity }
alepeino
  • 9,551
  • 3
  • 28
  • 48
  • 1
    I used the steps as you listed (other than `re-natal init FutureApp` to instantiate a new project), and Figwheel did indeed connect. Is there logging output that you could add from `react-native run-android`? I'm thinking specifically after `BUILD SUCCESSFUL` – nrako Sep 11 '18 at 16:27
  • @nrako see updated post for the output – alepeino Sep 12 '18 at 23:48
  • Hmm... that looks okay. I am not sure. Ran across this comment one of the issues, perhaps there's a versioning issue? `For react native 0.49+ you have to use re-natal 0.8+` [link](https://github.com/drapanjanas/re-natal/issues/170#issuecomment-370552264) – nrako Sep 13 '18 at 20:53

1 Answers1

0

I have had this in other cases as well but one case in which this will happen is when you have done a production build with Leiningen and not subsequently re-run re-natal use-figwheel. To solve this you would have to

  1. Run re-natal use-figwheel
  2. Relaunch react-native start / npm run start
  3. Reload the Android app.
Daniel Schlaug
  • 1,504
  • 1
  • 13
  • 17