【问题标题】:Expo app runs on ios and emulator but not on android deviceExpo 应用程序可在 ios 和模拟器上运行,但不能在 android 设备上运行
【发布时间】:2019-11-02 01:04:53
【问题描述】:

Expo 应用程序将在 ios 模拟器、ios 设备和 android 模拟器上正确构建和运行。但是当我构建一个apk并在android设备上运行时,应用程序在登录后冻结并且不会响应。总的来说,我对 react-native 和开发还很陌生,所以我不确定我会做错什么?

【问题讨论】:

  • 发生什么错误?

标签: android react-native android-emulator apk expo


【解决方案1】:

您是在调试还是发布时运行应用程序?您可以在 Android Studio 上使用 logcat 或在终端窗口中使用 react-native log-android 来跟踪错误。那应该向您显示错误消息。有很多方法可以了解您登录后发生的情况。查看https://facebook.github.io/react-native/docs/debugging

您还可以向我们展示一些代码,获取您的登录代码将有助于了解正在发生的事情。

【讨论】:

    【解决方案2】:

    我的代码有这个问题。这与登录无关,而是因为我使用的是 Google Maps API,并且我没有在 app.json 中为 Android 设置 API 密钥。

    https://github.com/brentvatne/growler-prowler/commit/3496e69b14adb21eb2025ef9e0719c2edbef2aa2

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-27
      • 2018-10-16
      相关资源
      最近更新 更多