【问题标题】:React-native on 64-bit devices - debug works fine but not release. No problem with 32-bit devices at allReact-native 在 64 位设备上 - 调试工作正常但不发布。 32位设备完全没问题
【发布时间】:2020-02-14 00:07:19
【问题描述】:

我搜索了很多,但没有一个发现与我的情况相同:

  1. 只有 64 位 Android 设备受到影响(尝试了几个 - 都一样)
  2. 在通过 USB 连接的相同设备上调试构建没有问题
  3. 每个 64 位设备上的发布签名构建挂起(尝试了两个 64/32 版本)
  4. 32 位和通用签名版本在 32 位设备上的作用就像魅力一样

SAME CODE 在调试和发布中的工作方式怎么可能不同,为什么?使用了不同的 JS Core?

[更新] catlog 显示 pouchdb 复制存在问题:

{ [Error]
10-19 08:55:39.157 22836 22855 I ReactNativeJS:   line: 132,
10-19 08:55:39.157 22836 22855 I ReactNativeJS:   column: 7285,
10-19 08:55:39.157 22836 22855 I ReactNativeJS:   sourceURL: 'index.android.bundle',
10-19 08:55:39.157 22836 22855 I ReactNativeJS:   result: 
10-19 08:55:39.157 22836 22855 I ReactNativeJS:    { ok: false,
10-19 08:55:39.157 22836 22855 I ReactNativeJS:      start_time: '2019-10-19T05:55:38.997Z',
10-19 08:55:39.157 22836 22855 I ReactNativeJS:      docs_read: 0,
10-19 08:55:39.157 22836 22855 I ReactNativeJS:      docs_written: 0,
10-19 08:55:39.157 22836 22855 I ReactNativeJS:      doc_write_failures: 0,
10-19 08:55:39.157 22836 22855 I ReactNativeJS:      errors: [],
10-19 08:55:39.157 22836 22855 I ReactNativeJS:      status: 'aborting',
10-19 08:55:39.157 22836 22855 I ReactNativeJS:      end_time: '2019-10-19T05:55:39.155Z',
10-19 08:55:39.157 22836 22855 I ReactNativeJS:      last_seq: 0 } }

在同一设备上调试时效果很好。 怎么样?

【问题讨论】:

    标签: android react-native 64-bit pouchdb


    【解决方案1】:

    原因是在调试构建中默认允许非 https 请求,在生产环境中您必须指定异常,否则代码只会默默地死掉,非常不清楚 Android 方法。在 iOS BTW 中也有类似的问题。所以与 Couch/Pouch DB 无关,只是操作系统特定的网络混乱

    【讨论】:

      【解决方案2】:

      你能附上来自 logcat 的日志吗?这将为正在发生的事情提供线索。

      在您的设备上安装发布版本。

      adb logcat -c // Clear all previous logs
      adb logcat > log.txt // Dump logs to a separate file 
      

      获得日志后,请查看您的包中是否有任何异常。如果是这样,请在此处分享,我们可以看到出了什么问题。没有日志,就很难推测。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-12-01
        • 1970-01-01
        • 2021-04-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-06-24
        相关资源
        最近更新 更多