Qt Creator Android 错误“已安装平台 SDK" [英] Qt Creator Android error "Platform SDK installed"

查看:60
本文介绍了Qt Creator Android 错误“已安装平台 SDK"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Android 开发 Qt 跨平台应用程序,最近我更新了 Qt 创建者并安装了新的 Qt 版本.我正在使用 'Qt Creator version 4.5.0'.我已经更新到'QT version 5.10'.此设置在 Ubuntu 16.04 上完成.

跟随链接

由于上述问题,我无法为 Android 构建应用程序.

我最近更新了我的 Android sdk,我能够从 Android Studio 构建和运行示例应用程序,这表明 SDK 安装工作正常.我正在使用 Android SDK 工具 26.1.1.请检查以下屏幕截图.

Android SDK 构建工具已安装.

Android SDK 平台已安装

已经通过 Stack Overflow 和 QT 论坛上的不同链接,都在建议降级 Android SDK 工具(由于 QT 已知错误),但没有一个解决方案对我有用.我知道使用 QT 5.9 和 Qt Creator 4.0 版构建 Android 应用程序的已知错误很少.我想它已解决,因为相同的设置在 Windows 10 上运行良好.

QT Creator 不会列出任何可用的 Android Build SDKQT Android 安装错误

如果这里有人解决了同样的问题,请帮忙.

解决方案

经过很多努力,我能够解决这个问题,感谢 Mohammad Kanan,Vesafary 的回答让我更接近 Answer,实际问题通过以下方式解决脚步.在 Ubuntu 中遇到相同问题或也可以在其他平台上工作的人可能会有所帮助.

  1. 第一步是(正如大多数答案所暗示的那样)从 JDK 9 更改为 JDK 8.我使用的是 Java 版本 "1.8.0_152".
  2. 第 1 步对我没有帮助(Qt creator Persist some Settings),所以我删除了完整的 Qt 5.8、5.9、5.10 安装(使用 Qt 维护工具)和以下 2 个链接完全卸载 Qt, 卸载 Qt Creator.

并再次安装.可能是您的问题在这一步得到解决.

  1. 在我的情况下,第 2 步也没有帮助,QT Creator 仍然保留一些设置,需要重置 Qt Creator 设置.可以通过删除此文件夹中的数据来完成

    ~/.config/QtProject ~/.config/Qt 文件 ~/.config/QtProject.conf

路径在不同的系统和操作系统中可能不同.在这种情况下,以下链接会有所帮助.

创作者常见问题解答

堆栈溢出 Qt 设置 1

堆栈溢出 Qt 设置 2

现在我可以构建和运行 Android 应用程序了.

I am developing Qt Cross platform application for Android, recently i have updated Qt creator and Installed new Qt version. I am using 'Qt Creator version 4.5.0'. I have updated to 'QT version 5.10'. This Set up is done on Ubuntu 16.04.

Followed link Getting Started with QT Installation.

I am always getting Error message "Android Settings have error" in Qt Creator->Tools->Options->Devices->Android.

Because of above issue i am not able to build application for Android.

I have recently updated my Android sdk, I am able to build and run Sample application from Android Studio, indicating that SDK instalation is working properly. I am using Android SDK tools 26.1.1. Please check bellow screen shots.

Android SDK build tools Installed.

Android SDk platforms installed

Already gone through different links on Stack Overflow and QT forum, All are Suggesting downgrade of Android SDK tools(Due to QT Known bug), but none of the solution is working for me. I know there are few known bugs building Android application with QT 5.9 and Qt Creator version 4.0. I guess It is resolved, as same set up is working fine on Windows 10.

QT Creator wont list any available Android Build SDKs QT Android Installation error

Please help if anybody here resolved same issue.

解决方案

After lot of effort I am able to fix this issue, thanks to Mohammad Kanan, Vesafary who's answer made me get closer to Answer, Actual issue resolved with the following steps. It may be helpful who are facing the same issue In Ubuntu or may work on other platforms as well.

  1. First Step is (as most of the answers suggest) changed from JDK 9 to JDK 8. I am using Java version "1.8.0_152".
  2. Step 1 didn't help me (Qt creator Persist some Settings), so i removed complete Qt 5.8,5.9,5.10 installation (Using Qt Maintainace tool) and following 2 links Uninstall Qt Completely, Uninstall Qt Creator.

and did Instalation again. May be your problem get resolved at this step.

  1. Step 2 also didn't help in my case, QT Creator still persist few settings and need to reset Qt creator settings. That can be done by deleting data in this folder

    ~/.config/QtProject ~/.config/Qt file ~/.config/QtProject.conf

path may be different in different System and OS. following links will be helpful in this case.

Creator FAQ

Stack Overflow Qt Settings 1

Stack Overflow Qt Settings 2

Now i am able to build and run android application.

这篇关于Qt Creator Android 错误“已安装平台 SDK"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆