Appcelerator可以启动Genymotion模拟器,但无法安装包:“找不到设备”

在Win10上,我安装了以下内容:

  • Appcelerator Studio

  • Appcelerator CLI

  • Android SDK(已启用ADB)

  • Genymotion(免费/私人执照)

我'm using regular Windows Command Prompt to interact with Appcelerator, trying to run a project via a Genymotion emulator (it'是Appcelerator RSS阅读器演示项目) . 我已经到了 appc run --platform android 将启动Genymotion并启动相应的模拟器(根据Android SDK虚拟设备管理器可用的唯一设备) .

但是,一旦模拟器准备就绪,Appc就会尝试安装apk,并失败并显示以下消息:

[INFO]  Making sure the adb server is running
[INFO]  Installing apk: C:\Users\USERNAME\Documents\Appcelerator_Studio_Workspace\Rss Reader\build\android\bin\RSS Reader.apk
[ERROR] Failed to install apk on "192.168.128.101:5555"
[ERROR] Error: device not found

If Appc can find the appropriate emulator to start it up, why does installation fail with "device not found"?

如果我立即打开一个新控制台并检查adb连接,我会看到指定的设备已连接:

>C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools>adb devices
List of devices attached 192.168.128.101:5555 device

我已尝试以下方法进行故障排除:

  • 确保SDK和ADB路径正确无误

  • 确保Genymotion路径正确

  • 确保模拟器具有正确的API(25)和操作系统版本(7.1.0)

只是注意,当我尝试在没有模拟器/ Genymotion启动的情况下运行 appc run --platform android 时,它将完美地启动模拟器,但从未将其识别为"ready",并且失败并显示以下内容:

[INFO]  Waiting for emulator to become ready...
[ERROR] Emulator failed to start in a timely manner
The current timeout is set to 120000 ms

如果模拟器已经启动,它将按照顶部所述完成,并显示“找不到设备”错误 .


Appc信息(由“运行”的Appc CLI生成):

Operating System
  Name                        = Microsoft Windows 10 Enterprise
  Version                     = 10.0.14393
  Architecture                = 64bit
  # CPUs                      = 4
  Memory                      = 17037770752

Node.js
  Node.js Version             = 6.11.3
  npm Version                 = 3.10.10

Titanium CLI
  CLI Version                 = 5.0.14

Titanium SDK
  SDK Version                 = 6.2.2.GA
  SDK Path                    = C:\ProgramData\Titanium\mobilesdk\win32\6.2.2.GA
  Target Platform             = android

回答(1)

2 years ago

试试这个:

appc run -p android -C "(name of genymotion virtual device)"