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

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

上一主题下一主题
 

离线yijunziran

新手上路


只看楼主 倒序阅读楼主  发表于: 2015-04-11

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

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

22:19:48: 进程"D:\Qt\Qt5.4.1\Tools\mingw491_32\bin\mingw32-make.exe"正常退出。
22:19:48: Starting: "D:\Qt\Qt5.4.1\5.4\android_armv7\bin\androiddeployqt.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:\Qt\Qt5.4.1\5.4\android_armv7\bin\androiddeployqt.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.

回复

举报

 
分享到淘江湖新浪QQ微博QQ空间开心人人豆瓣网易微博百度鲜果白社会飞信
 

离线fcwr2010

新手上路


只看该作者1楼 发表于: 2015-04-11

你应该是没有设置Android SDK,看图

  • 图片:QQ截图20150412000332.png

回复

举报

 

离线xiaoxiangyu

新手上路


只看该作者2楼 发表于: 2016-02-17

感谢!!!

回复

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

原文地址:https://www.cnblogs.com/okgogo2000/p/9257808.html

时间: 2024-08-26 06:15:39

Qt for android运行时出错 Error: Target id 'android--1' is not valid的相关文章

创建Android项目时出错——No resource found that matches the given name 'Theme.AppCompat.Light'

创建Android项目时出错,error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. 问题描述: 创建一个Android应用项目时,需指定其适用的SDK版本,默认如下图: 最低适用版本为:API 8: Android 2.2 (Froyo) 目标版本为:API 21: Android 4.X (L Preview) 编译版本为:A

winpcap示例程序采用VC6编译时出错error C2054: expected '(' to follow '_W64'

e:\vehiclesecurity\wpdpack_4_1_2\include\pcap-stdinc.h(80) : error C2054: expected '(' to follow '_W64' e:\vehiclesecurity\wpdpack_4_1_2\include\pcap-stdinc.h(80) : error C2085: 'uintptr_t' : not in formal parameter list e:\vehiclesecurity\wpdpack_4_

【Android运行时权限申请快速学习教程】

1. Android权限介绍 Android权限是Android应用在设备上运行所需要的权力,义务就是为用户带来此Android应用的功能. 问题来源:在Android6.0版本之前,根据App在AndroidManifest申请的权限,在安装此App的时候进行提示权限允许,不允许就不给装不给用,那么我们只能默默的忍受这个APP对我们隐私的侵蚀(Eg.通讯录的读取权限). 解决办法:后来Google发现,诶,这样会导致Android用户们想用这个APP的某些功能而不能用.因此,在Android6

Android 运行时报错Error running app: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled. 的解决办法

解决方法:在菜单栏,Tools->Android->Enable ADB integration勾选就可以了. Android 运行时报错Error running app: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled. 的解决办法

【Cocos2d-x】编译Android工程时提示error: 'GL_LINE_SMOOTH' was not declared in this scope

在Cocos2d-x项目中用到了OpenGL,使用GL_LINE_SMOOTH开启线条抗锯齿.代码如下: ccDrawColor4B(50, 26, 12, 255); // 设置线宽 glLineWidth(2.0f); // 启用线段反锯齿 glEnable(GL_LINE_SMOOTH); // 画第一条线 ccDrawLine(startPoint1,endPoint); // 画第二条线 ccDrawLine(startPoint2,endPoint); // 关闭线段反锯齿 glDi

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

输入命令: lianxumacdeMac-mini-2:hello-jni lianxumac$ android list targets Available Android targets: ---------- id: 1 or "android-7" Name: Android 2.1 Type: Platform API level: 7 Revision: 3 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default),

vueJs引入elementUI组件,运行时出现ERROR

vueJs引入elementUI组件,运行时出现ERROR:ERROR Failed to compile with 1 errors This dependency was not found: * element-ui/lib/theme-default/index.css in ./src/main.js To install it, you can run: npm install --save element-ui/lib/theme-default/inde解决方法:index.cs

Eclipse编译Android项目时出现的问题:Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead.

Consle: Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead. Please use Android Tools > Fix Project Properties. 然而,按照提示的方法,右键项目->Android Tools->Fix Project Properties时,发现并没有卵用... 我的解决方式是: 右键项目->Properties,把 JavaCompiler

Android运行时注解

Android的注解有编译时注解和运行时注解,本文就介绍下运行时注解. 其实非常简单,直接上代码:本文主要是替代传统的findViewById()的功能,就是在我们Activity中不需要再使用findViewById()去给View赋值了,通过注解在运行阶段自动赋值.以及setOnClickListener()也是一样的原理.使用注解和反射技术. 1. 定义自己的annotation注解. 定义findViewbyId这个功能的注解 package com.xxx.xxx.xxx; impor