【问题标题】:REPL - Figwheel won't connect to re-natal appREPL - Figwheel 无法连接到重生应用程序
【发布时间】:2019-02-13 20:43:31
【问题描述】:

我正在从 Re-Natal 模板启动一个应用程序(没有更改它;project.clj 来自 https://github.com/drapanjanas/re-natal/blob/master/resources/project.clj)。

然后我跑了

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

应用程序在设备上运行正常,但 repl 停留在 Prompt will show when Figwheel connects to your application,并且代码不会重新加载。 在real android 设备上也会发生同样的情况。

我还在应用启动后重新加载它。

我错过了什么吗?


更新: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 }

【问题讨论】:

  • 我使用了你列出的步骤(除了re-natal init FutureApp 来实例化一个新项目),而且 Figwheel 确实连接了。是否有可以从react-native run-android 添加的日志记录输出?我在想BUILD SUCCESSFUL
  • @nrako 查看输出的更新帖子
  • 嗯...看起来不错。我不知道。遇到这个评论的问题之一,也许有版本问题? For react native 0.49+ you have to use re-natal 0.8+link

标签: react-native adb clojurescript figwheel re-natal


【解决方案1】:

我在其他情况下也遇到过这种情况,但是会发生这种情况的一种情况是,当您使用 Leiningen 进行了生产构建并且随后没有重新运行 re-natal use-figwheel 时。要解决这个问题,您必须

  1. 运行re-natal use-figwheel
  2. 重新启动react-native start / npm run start
  3. 重新加载 Android 应用。

【讨论】:

    猜你喜欢
    • 2015-12-14
    • 2020-01-13
    • 1970-01-01
    • 2019-12-04
    • 1970-01-01
    • 2013-06-16
    • 1970-01-01
    • 1970-01-01
    • 2019-11-25
    相关资源
    最近更新 更多