1

问题一:

我正在使用 Windows 10 家庭版。我已经安装了 Qt6、Android Studio 2019 和 Visual Studio 2019。在安装 Visual Studio 2019 之前,Qt6 工作正常,但是由于我已经安装了 Visual Studio 2019,现在 Qt6 中有所有 Android 6.0.0 Clang 套件的重复编译器(请看截图)。有人可以告诉我如何删除重复的吗?删除按钮全部变灰。为什么 Qt6 会自动检测多个相同的编译器?

Auto-Detect 下的重复编译器是:

  • Android Qt 6.0.0 Clang arm64-v8a
  • Android Qt 6.0.0 Clang armeabi-v7a
  • 安卓 Qt 6.0.0 Clang x86
  • Android Qt 6.0.0 Clang x86_64

Qt6 自动检测到三个相同的实例,所有这些实例的删除选项都是灰色的。

重复的编译器

无法删除重复的编译器(灰显)

问题2:

打开一个项目示例(即Coffee machine,Qt6安装自带的默认示例项目)后,在Qt6的General Messages (Alt + 6)中显示如下:

2021-01-12T18:19:28 Clang Code Model: Error: The clangbackend executable "C:\Qt\Tools\QtCreator\bin\clangbackend.exe" could not be started (timeout after 10000ms).
QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Basic
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Basic 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''


QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Basic
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Basic 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''


QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Fusion
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Fusion 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''


QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Imagine
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Imagine 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''


QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Universal
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Universal 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''


QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Imagine
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Imagine 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''


QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Material
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Material 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''


QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Material
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Material 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''


QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Universal
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Universal 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''


QML module does not contain information about components contained in plugins.

Module path: C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/Fusion
See "Using QML Modules with Plugins" in the documentation.

Automatic type dump of QML module failed.
Errors:
"C:\Qt\6.0.0\msvc2019_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable QtQuick.Controls.Fusion 2.0 .
QQmlComponent: Component is not ready
file:///C:/Qt/6.0.0/msvc2019_64/qml/QtQuick/Controls/loaddependencies.qml: Module namespace 'QtQuick.Controls' does not match import URI ''

有人可以解释发生了什么,我应该怎么做才能纠正这些错误?到目前为止,我无法通过谷歌搜索找到任何答案。有没有人遇到过类似的问题?

4

1 回答 1

0

我遇到了同样的问题。它发生在手动或通过 Android Studio 删除 NDK 版本之后。由于 Qt 需要为每个 Qt 版本提供特定的 Ndk 版本(此处的表格),因此您必须通过 Qt 选项工具重新安装 NDK。这个过程奇怪地添加了另一个自动检测工具包,并且不会覆盖旧的工具包。

解决方案是从profiles.xml. 您可以在以下位置轻松找到它:

C:\Users\**current_user**\AppData\Roaming\QtProject\qtcreator

为了决定删除哪一个,我这样做了:

  1. 检查编译器和调试器。如您所见,第二个将工作,因为 android 调试器和编译器配置了相关的 NDK。(一般其他人使用windows cdb调试器i686编译器)在此处输入图像描述

  2. 更改其他套件的名称,警告信号将消失:在此处输入图像描述

  3. 在profiles.xml 中找到配置文件

<value type="QString" key="PE.Profile.Name">Android Qt %{Qt:Version} Clang Multi-Abi--delete this</value> 并删除整个数据标签

  1. 重命名profiles.xml 中的数据标签<variable>,如Profile.0、Profile.1。

  2. 不要忘记<variable>Profile.count</variable>根据您的套件数量更改标签。

干杯!

在此处输入图像描述

于 2021-10-06T08:22:08.890 回答