react-native - REPL - Figwheel 无法连接到重生应用程序

标签 react-native adb clojurescript figwheel re-natal

我正在从 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,代码不会重新加载。 在 真实 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 }

最佳答案

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

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

关于react-native - REPL - Figwheel 无法连接到重生应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52240432/

相关文章:

javascript - 如何在 React Native 上访问数组状态或 json 数据?

android - 安装 .apk 时模拟器超时错误消息

adb - 使用 adb pull 复制数据库文件会导致 'permission denied' 错误

android - 在 adb logcat 终端中过滤应用程序

clojure - Clojure/ClojureScript 中不区分大小写的过滤器

intellij-idea - 在 WebStorm 上安装 Cursive 插件

clojure - 混合两个向量 : [a a] and [b b] to [a b a b]

javascript - 如何创建固定覆盖 <View> React Native

android - 如何配置 react native android 库以使用 npm 安装的 react-native?

javascript - 世博会互动推送通知