Qt for android运行时出错 Error: Target id 'android--1' is not valid

Posted okgogo2000

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Qt for android运行时出错 Error: Target id 'android--1' is not valid相关的知识,希望对你有一定的参考价值。

 

[提问]windows7下Qt for android运行时出错 Error: Target id ‘android--1‘ is not valid[复制链接]

上一主题下一主题技术分享图片
 

 
技术分享图片
 
技术分享图片
只看楼主 倒序阅读楼主  发表于: 2015-04-11
 
 


程序是正确的,在Window环境下运行OK
Android模拟器能跑起来。

在Android上运行时出现这种情况

22:19:48: 进程"D:QtQt5.4.1Toolsmingw491_32inmingw32-make.exe"正常退出。
22:19:48: Starting: "D:QtQt5.4.15.4android_armv7inandroiddeployqt.exe" --input D:/qt5/qml/qtquickbook/build-touchEvent-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_1-Release/android-libtouchEvent.so-deployment-settings.json --output D:/qt5/qml/qtquickbook/build-touchEvent-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_1-Release/android-build --deployment bundled --android-platform android--1 --jdk "D:/Program Files/Java/jdk1.7.0_45" --ant D:/qt5/apache-ant-1.9.4/bin/ant.bat
Error: Target id ‘android--1‘ is not valid. Use ‘android.bat list targets‘ to get the target ids.
Generating Android Package
  Input file: D:/qt5/qml/qtquickbook/build-touchEvent-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_1-Release/android-libtouchEvent.so-deployment-settings.json
  Output directory: D:/qt5/qml/qtquickbook/build-touchEvent-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_1-Release/android-build/
  Application binary: D:/qt5/qml/qtquickbook/build-touchEvent-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_1-Release/libtouchEvent.so
  Android build platform: android--1
  Install to device: No
Buildfile: build.xml does not exist!
Build failed
Warning: Android platform ‘android--1‘ does not exist in SDK.
Building the android package failed!
  -- For more information, run this command with --verbose.
22:19:58: 进程"D:QtQt5.4.15.4android_armv7inandroiddeployqt.exe"退出,退出代码 14 。
Error while building/deploying project touchEvent (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.4.1))
When executing step "Build Android APK"
22:19:58: Elapsed time: 00:13.


技术分享图片


 
 
 
 
 

离线fcwr2010
 
技术分享图片
技术分享图片
只看该作者1楼 发表于: 2015-04-11
 
 
 
你应该是没有设置Android SDK,看图
  • 技术分享图片

    图片:QQ截图20150412000332.png

 

 
技术分享图片
技术分享图片
只看该作者2楼 发表于: 2016-02-17
 
 
 
感谢!!!
回复

 































以上是关于Qt for android运行时出错 Error: Target id 'android--1' is not valid的主要内容,如果未能解决你的问题,请参考以下文章

Qt错误:error: undefined reference to `vtable for 类名'

Qt mobile android build error with android ABI level 15,但适用于更高的 ABI

Qt for android编译报错218:12: fatal error: ‘features.h‘ file not found # include <features.h>

Qt for android编译报错218:12: fatal error: ‘features.h‘ file not found # include <features.h>

Xcode 11 Firebase auth for Mac app has error 访问钥匙串时出错

cordova发布编译出错,提示:cordova-build error : Execution failed for task ':mergeReleaseResources'.或(