简体   繁体   English

Qt for Android错误:目标ID“ android--1”无效

[英]Qt for Android Error: Target id 'android--1' is not valid

I try to create a Qt application for desktop and android platforms. 我尝试为台式机和Android平台创建Qt应用程序。 All parameters in Tools->Options->Android are correct. 工具->选项-> Android中的所有参数均正确。

Qt Android settings Qt Android设置

When I try to build my application, I get an error: 当我尝试构建应用程序时,出现错误:

Error: Target id 'android--1' is not valid. Use 'android.bat list targets' to get the target ids.

But I have several platforms installed (android-10, 15, 19, 23). 但是我已经安装了多个平台(android-10、15、19、23)。 Also, I have found some info on the same issue issue , but it have not helped me. 此外,我发现了有关同一问题的一些信息,但并没有帮助我。

I use: 我用:

  • Windows 7 x64 Windows 7 x64
  • Qt Creator 3.6.0 Based on Qt 5.5.1 (MSVC 2013, 32 bit) 基于Qt 5.5.1的Qt Creator 3.6.0(MSVC 2013,32位)
  • Qt 5.5.1 Qt 5.5.1

Has somebody encountered with the same problem? 有人遇到过同样的问题吗?

  1. Close the project 关闭专案
  2. Open ProjectName.pro.user file with notepad 用记事本打开ProjectName.pro.user文件
  3. Find value with key: "BuildTargetSdk" 使用键“ BuildTargetSdk”查找值
  4. Change 'android--1' to Something like 'android-16' or other version 将“ android--1”更改为“ android-16”或其他版本
  5. Save the file and open the project again may be needed to repeat steps again 保存文件并再次打开项目,可能需要再次重复步骤

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

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