“请确保您有一个Android模拟器运行或连接的设备”

问题描述 投票:1回答:2

我有工作从一个特定设备一个奇怪的错误。

我可以运行我的模拟器反应本机应用程序的罚款,并无论从终端和Android的工作室我自己的设备上。但是,当我尝试运行它给了我下面的错误工作装置形式的终端:

Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment

你要知道,该设备被识别:

adb devices
List of devices attached
S7M7N15610000083    device

更奇怪的是,我能成功地从机器人工作室运行工作设备!但是,我希望能够从使用终端运行:反应原生运行Android系统。没有人有任何想法可能会导致这个错误?

react-native
2个回答
8
投票

检查权限为Android / gradlew文件。

内无反应在终端本地项目的根文件夹

ls -l android/gradlew

如果文件权限是不是像下面

-rwxr-xr-x 'links' 'owner' 'group' 'size' 'time' android/gradlew

链接,所有者,组的大小,和时间根据系统所取代。

chmod 755 android/gradlew

内ReactNative根终端。

来源:https://github.com/facebook/react-native/issues/8868

有关权限有用的资源:

https://askubuntu.com/questions/528411/how-do-you-view-file-permissions


0
投票

我也面临同样的问题。

我选择,*媒体设备(MTP)连接到系统相连的USB设备后,一旦解决了这个问题。 *反应本地运行的Android

© www.soinside.com 2019 - 2024. All rights reserved.