【问题标题】:running react native app on android studio emulator在 android studio 模拟器上运行 react native 应用程序
【发布时间】:2019-09-17 21:31:47
【问题描述】:

我使用 react-native-init 命令创建了我的应用程序。我已经安装了 android studioPixel 2 API 28。我可以成功运行我的安卓模拟器。然后我在我的项目目录中运行 react-native run-android。 但是,我的 android 模拟器上什么也没有,我在终端中得到了这个输出:

info Starting JS server...
info Building and installing the app on the device (cd android && ./gradlew app:installDebug)...

> Task :app:installDebug
01:44:46 V/ddms: execute: running am get-config
01:44:46 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
01:44:46 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Pixel_2_API_28(AVD) - 9' for app:debug
01:44:46 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'
01:44:46 D/Device: Uploading file onto device 'emulator-5554'
01:44:46 D/ddms: Reading file permision of /home/kasra/Documents/Linkap/nativeReact/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
01:44:46 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
01:44:47 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
01:44:47 V/ddms: execute: returning
01:44:47 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
01:44:47 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
01:44:47 V/ddms: execute: returning
Installed on 1 device.

BUILD SUCCESSFUL in 1s
26 actionable tasks: 1 executed, 25 up-to-date
/bin/sh: 1: adb: not found
info Starting the app (adb shell am start -n com.nativereact/com.nativereact.MainActivity...

react-native-cli: 2.0.1

反应原生:0.59.5

Android Studio 3.4

Build #AI-183.5429.30.34.5452501,于 2019 年 4 月 10 日构建

JRE:1.8.0_152-release-1343-b16-5323222 amd64

JVM:JetBrains s.r.o 的 OpenJDK 64 位服务器虚拟机

Linux 4.15.0-47-通用

【问题讨论】:

    标签: android-studio react-native android-emulator


    【解决方案1】:

    您是否尝试过仅在终端中运行 react-native start 并运行模拟器?我发现 react-native run-and

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-10-24
      • 2016-11-29
      • 2021-05-07
      • 2019-12-21
      • 2023-01-29
      • 1970-01-01
      • 2016-03-20
      相关资源
      最近更新 更多