【问题标题】:Qt Android Deployment FailingQt Android 部署失败
【发布时间】:2017-07-28 18:29:58
【问题描述】:

我已尝试根据here列出的文档修改Android模板文件

在我的 .pro 文件中,我有以下内容:

ANDROID_PACKAGE_SOURCE_DIR = Android_Files

我的目录结构是这样的:

QtProject
|-- Android_Files
|   |-- AndroidManifest.xml
|
|-- Resources
|-- Source
|-- Application.pro
|-- Application.pro.user

但是当我的 Qt Creator 去部署应用程序时,我收到以下错误:

Cannot find android sources in Android_Files

我错过了什么吗?

【问题讨论】:

  • ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
  • 我想你的意思是 ANDROID_PACKAGE_SOURCE_DIR = $$PWD/Android_Files 我的情况?
  • 是的,请尝试一下。
  • 这确实有效!我是否遗漏了文档中的某些内容,或者 Qt 的文档中遗漏了某些内容?
  • 如果您将其作为答案发布,我将接受它作为正确答案,以便您获得信用。

标签: android qt qtandroidextras


【解决方案1】:

Android包目录不对。

使用$PWD引用当前项目目录

ANDROID_PACKAGE_SOURCE_DIR = $$PWD/Android_Folder_Name

在你的情况下:$$PWD/Android_Files

更多关于残障人士的信息:

The PWD variable specifies the full path leading to the directory containing the current file being parsed. This can be useful to refer to files within the source tree when writing project files to support shadow builds.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-12
    • 2021-04-23
    • 2020-01-06
    • 2013-04-08
    相关资源
    最近更新 更多