QT Creator wont list any available Android Build SDKs

前端 未结 3 1238
时光说笑
时光说笑 2020-12-10 05:53

When attempting to build and run an example project with QT Creator, it fails, saying:

Build failed
Warning: Android platform \'android--1\' does not exist i         


        
3条回答
  •  隐瞒了意图╮
    2020-12-10 06:41

    It is a problem with newest Android SDK Tools (25.3.0)

    QT 5.8/QT Creator 4.2.1 uses old, now removed, executables from Android Tools.

    https://developer.android.com/studio/releases/sdk-tools.html SDK Tools, Revision 25.3.0 (March 2017):

    Obsolete/deprecated tools have been removed:

    • android

    QT 5.8 will not work automatically with Android SDK Tools 25.3.0, and to make it work, you will need to modify files by hand:

    • QT is unable to distinguish Android target versions and those need to be modified in .pro.user file (QT must be closed while editing this file)

    • Also from not documented changes, there is no longer templates folder available from Android SDK Tools. QT require them to be there to build, so you will need to copy them from AndroidStudio: \plugins\android\lib\templates into \templates

      INFO: every update to SDK packages made through AndroidStudio will remove this folder, and you will need to copy it again


    easiest solution would be to get older version of Android SDK Tools (and use them only for QT). I've managed to do so by modifying link from this site https://developer.android.com/studio/index.html#downloads to point to previous version:

    https://dl.google.com/android/repository/tools_r25.2.5-windows.zip

提交回复
热议问题