简体   繁体   English

QT5:无法部署android应用

[英]QT5: cannot deploy android app

I installed QT 5.1 about 2 hours ago with all the stuff required to create an android app using C++ / QT. 我大约2个小时前安装了QT 5.1,并使用C ++ / QT创建了android应用程序所需的所有东西。

When I create a Qt Quick 2 Application i try to deploy it to see how it looks like. 创建Qt Quick 2应用程序时,我尝试对其进行部署以查看其外观。 An emulator starts but the app doesn't start and when I quit the emulator, I have this message : 模拟器已启动,但应用程序未启动,当我退出模拟器时,出现以下消息:

:-1: error: Cannot deploy: no devices or emulators found for your package. :-1:错误:无法部署:没有为您的软件包找到设备或仿真器。

The emulator works fine. 仿真器工作正常。 I'm on Windows 8 Pro 64 bits. 我在Windows 8 Pro 64位上。 Why can't I deploy a generated app ? 为什么我不能部署生成的应用程序?

Thanks a lot, Jean (: 非常感谢Jean(:

you have to launch the avd form android sdk manager > tools > manage avds, unlock it then run your project. 您必须启动avd表单android sdk管理器>工具>管理avds,将其解锁然后运行您的项目。 for more information please see my answer here 有关更多信息,请在此处查看我的答案

Attempting to do the same as OP, encountered the same problem. 尝试做与OP相同的操作时,遇到了相同的问题。

Make sure adb finds your device. 确保adb找到您的设备。 Instructions here http://developer.android.com/tools/device.html 此处的说明http://developer.android.com/tools/device.html

Make sure you are deploying the correct API version. 确保您正在部署正确的API版本。 Attempting to deploy a package with too high API version will cause Qt Creator to skip your device and fallback to the emulator. 尝试以太高的API版本部署软件包将导致Qt Creator跳过您的设备并退回到仿真器。

You can find the API version you're using from Qt Creator "Projects" view from the android kit run settings under "Package Configuration" details. 您可以从“套件配置”详细信息下的android套件运行设置的Qt Creator“项目”视图中找到正在使用的API版本。 Check your device's android version and the corresponding API version from here https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels 从此处https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels检查设备的android版本和相应的API版本

I've successfully deployed my first application and everything seems to be working fine. 我已经成功部署了我的第一个应用程序,并且一切似乎都工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM