Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Missing gcc (?) , C++ project wants android stuff



  • I have finally installed full QtCreator , three times ( !) using off line installer. After I build my first project I am getting this error:

    Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
    Could not read qmake configuration file /home/q/Qt5.12.10/5.12.10/android_x86/mkspecs/android-clang/qmake.conf.
    Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
    Could not read qmake configuration file /home/q/Qt5.12.10/5.12.10/android_arm64_v8a/mkspecs/android-clang/qmake.conf.
    Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
    Could not read qmake configuration file /home/q/Qt5.12.10/5.12.10/android_armv7/mkspecs/android-clang/qmake.conf.
    Error while parsing file /home/q/TESTuntitled/TESTuntitled.pro. Giving up.
    Project ERROR: Cannot run compiler 'clang++'. Output:

    ===================
    Maybe you forgot to setup the environment?

    WHAT ENVIRONMENT ????

    I have a warning that android kit is not installed and I have selected GCC kit.

    I have not intentionally set for android project , THERE IS NO SUCH OPTION DURING THE OFF LINE INSTALL PROCESS..

    Here is my system info :

    {noformat}
    Qt 5.15.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160406 (Red Hat 5.3.1-6)) on "xcb"
    OS: Ubuntu 20.10 [linux version 5.8.0-43-generic]

    Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2

    Environment:
    QT_ACCESSIBILITY="1"
    QT_IM_MODULE="ibus"

    Features: QT_NO_EXCEPTIONS

    Library info:
    PrefixPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt
    DocumentationPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/doc
    HeadersPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/include
    LibrariesPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/lib
    LibraryExecutablesPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/libexec
    BinariesPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/bin
    PluginsPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/plugins
    ImportsPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/imports
    Qml2ImportsPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/qml
    ArchDataPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt
    DataPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt
    TranslationsPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/translations
    ExamplesPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/examples
    TestsPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt/tests
    SettingsPath: /home/q/Qt5.12.10/Tools/QtCreator/lib/Qt

    Standard paths [... denote writable entry]:
    DesktopLocation: "Desktop" /home/q/Desktop
    DocumentsLocation: "Documents" /home/q/Documents
    FontsLocation: "Fonts" /home/q/.local/share/fonts /home/q/.fonts /usr/share/ubuntu/fonts /usr/local/share/fonts /usr/share/fonts /var/lib/snapd/desktop/fonts
    ApplicationsLocation: "Applications" /home/q/.local/share/applications /usr/share/ubuntu/applications /usr/local/share/applications /usr/share/applications /var/lib/snapd/desktop/applications
    MusicLocation: "Music" /home/q/Music
    MoviesLocation: "Movies" /home/q/Videos
    PicturesLocation: "Pictures" /home/q/Pictures
    TempLocation: "Temporary Directory" /tmp
    HomeLocation: "Home" /home/q
    AppLocalDataLocation: "Application Data" /home/q/.local/share/QtProject/qtdiag /usr/share/ubuntu/QtProject/qtdiag /usr/local/share/QtProject/qtdiag /usr/share/QtProject/qtdiag /var/lib/snapd/desktop/QtProject/qtdiag
    CacheLocation: "Cache" /home/q/.cache/QtProject/qtdiag
    GenericDataLocation: "Shared Data" /home/q/.local/share /usr/share/ubuntu /usr/local/share /usr/share /var/lib/snapd/desktop
    RuntimeLocation: "Runtime" /run/user/1000
    ConfigLocation: "Configuration" /home/q/.config /etc/xdg/xdg-ubuntu /etc/xdg
    DownloadLocation: "Download" /home/q/Downloads
    GenericCacheLocation: "Shared Cache" /home/q/.cache
    GenericConfigLocation: "Shared Configuration" /home/q/.config /etc/xdg/xdg-ubuntu /etc/xdg
    AppDataLocation: "Application Data" /home/q/.local/share/QtProject/qtdiag /usr/share/ubuntu/QtProject/qtdiag /usr/local/share/QtProject/qtdiag /usr/share/QtProject/qtdiag /var/lib/snapd/desktop/QtProject/qtdiag
    AppConfigLocation: "Application Configuration" /home/q/.config/QtProject/qtdiag /etc/xdg/xdg-ubuntu/QtProject/qtdiag /etc/xdg/QtProject/qtdiag

    File selectors (increasing order of precedence):
    en_US unix linux ubuntu

    Network:
    Using "OpenSSL 1.1.1f 31 Mar 2020", version: 0x1010106f

    Platform capabilities: ThreadedPixmaps OpenGL ThreadedOpenGL WindowMasks MultipleWindows ForeignWindows NonFullScreenWindows NativeWidgets WindowManagement SyncState RasterGLSurface SwitchableWidgetComposition

    Style hints:
    mouseDoubleClickInterval: 400
    mousePressAndHoldInterval: 500
    startDragDistance: 8
    startDragTime: 500
    startDragVelocity: 0
    keyboardInputInterval: 400
    keyboardAutoRepeatRate: 30
    cursorFlashTime: 1200
    showIsFullScreen: 0
    showIsMaximized: 0
    passwordMaskDelay: 0
    passwordMaskCharacter: U+2022
    fontSmoothingGamma: 1.7
    useRtlExtensions: 0
    setFocusOnTouchRelease: 0
    tabFocusBehavior: Qt::TabFocusAllControls
    singleClickActivation: 0

    Additional style hints (QPlatformIntegration):
    ReplayMousePressOutsidePopup: 0

    Theme:
    Platforms requested : ubuntu,gtk3,gnome,generic
    available : gtk3,snap,flatpak,xdgdesktopportal
    Styles requested : fusion,windows
    available : Windows,Fusion
    Icon theme : Yaru, from /home/q/.local/share/icons,/usr/share/icons,/var/lib/snapd/desktop/icons
    System font : "Ubuntu" 11
    Native file dialog
    Native color dialog
    Native font dialog

    Fonts:
    General font : "Ubuntu" 11
    Fixed font : "monospace" 11
    Title font : "DejaVu LGC Sans" 12
    Smallest font: "DejaVu LGC Sans" 12

    Palette:
    QPalette::WindowText: #ff000000
    QPalette::Button: #ffefefef
    QPalette::Light: #ffffffff
    QPalette::Midlight: #ffcacaca
    QPalette::Dark: #ff9f9f9f
    QPalette::Mid: #ffb8b8b8
    QPalette::Text: #ff000000
    QPalette::BrightText: #ffffffff
    QPalette::ButtonText: #ff000000
    QPalette::Base: #ffffffff
    QPalette::Window: #ffefefef
    QPalette::Shadow: #ff767676
    QPalette::Highlight: #ff308cc6
    QPalette::HighlightedText: #ffffffff
    QPalette::Link: #ff0000ff
    QPalette::LinkVisited: #ffff00ff
    QPalette::AlternateBase: #fff7f7f7
    QPalette::NoRole: #ff000000
    QPalette::ToolTipBase: #ffffffdc
    QPalette::ToolTipText: #ff000000
    QPalette::PlaceholderText: #80000000

    Screens: 1, High DPI scaling: inactive

    0 "VGA-1" Depth: 24 Primary: yes

    Manufacturer: Sony
    Model: SDM-S71-
    Serial number: 4047359-
    Geometry: 1280x1024+0+0 Available: 1208x997+72+27
    Physical size: 338x270 mm Refresh: 60.0197 Hz Power state: 0
    Physical DPI: 96.1893,96.3319 Logical DPI: 96,96 Subpixel_None
    DevicePixelRatio: 1 Pixel density: 1
    Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0

    LibGL Vendor: Intel Open Source Technology Center
    Renderer: Mesa DRI Intel(R) HD Graphics (BYT)
    Version: 3.0 Mesa 20.2.6
    Shading language: 1.30
    Format: Version: 3.0 Profile: 0 Swap behavior: 0 Buffer size (RGB): 8,8,8
    Profile: None (QOpenGLFunctions_3_0)

    Unable to create a Vulkan instance, error code is0

    Qt Rendering Hardware Interface supported backends:
    OpenGL (with default QSurfaceFormat):
    Min Texture Size: 1
    Max Texture Size: 16384
    Max Color Attachments: 8
    Frames in Flight: 1
    Uniform Buffer Alignment: 1
    Supported MSAA sample counts: 1,2,4,8
    Features:
    - MultisampleTexture
    v MultisampleRenderBuffer
    - DebugMarkers
    - Timestamps
    - Instancing
    - CustomInstanceStepRate
    - PrimitiveRestart
    v NonDynamicUniformBuffers
    v NonFourAlignedEffectiveIndexBufferOffset
    v NPOTTextureRepeat
    - RedOrAlpha8IsRed
    v ElementIndexUint
    - Compute
    v WideLines
    v VertexShaderPointSize
    - BaseVertex
    - BaseInstance
    v TriangleFanTopology
    v ReadBackNonUniformBuffer
    v ReadBackNonBaseMipLevel
    Texture formats: RGBA8 BGRA8 R8 R16 RED_OR_ALPHA8 RGBA16F RGBA32F R16F R32F D16 D32F BC1 BC2 BC3 ETC2_RGB8 ETC2_RGB8A1 ETC2_RGBA8

    Failed to load vulkan: Cannot load library vulkan: (vulkan: cannot open shared object file: No such file or directory)
    initInstance: No Vulkan library available
    Failed to create platform Vulkan instance
    Failed to load vulkan: Cannot load library vulkan: (vulkan: cannot open shared object file: No such file or directory)
    initInstance: No Vulkan library available
    Failed to create platform Vulkan instance
    Vulkan instance is not valid

    Plugin information:

    • Android 4.13.1
    • AutoTest 4.13.1
      AutotoolsProjectManager 4.13.1
      BareMetal 4.13.1
    • Bazaar 4.13.1
      Beautifier 4.13.1
    • BinEditor 4.13.1
    • Bookmarks 4.13.1
      Boot2Qt 4.13.1
    • CMakeProjectManager 4.13.1
    • CVS 4.13.1
    • ClangCodeModel 4.13.1
      ClangFormat 4.13.1
    • ClangTools 4.13.1
    • ClassView 4.13.1
      ClearCase 4.13.1
    • CodePaster 4.13.1
      CompilationDatabaseProjectManager 4.13.1
    • Core 4.13.1
    • CppEditor 4.13.1
    • CppTools 4.13.1
      Cppcheck 4.13.1
    • CtfVisualizer 4.13.1
    • Debugger 4.13.1
    • Designer 4.13.1
    • DiffEditor 4.13.1
      EmacsKeys 4.13.1
    • FakeVim 4.13.1
    • GLSLEditor 4.13.1
    • GenericProjectManager 4.13.1
    • Git 4.13.1
      HelloWorld 4.13.1
    • Help 4.13.1
    • ImageViewer 4.13.1
    • IncrediBuild 4.13.1
      Ios 4.13.1
    • LanguageClient 4.13.1
    • Macros 4.13.1
    • Marketplace 4.13.1
      McuSupport 4.13.1
    • Mercurial 4.13.1
      MesonProjectManager 4.13.1
    • ModelEditor 4.13.1
      Nim 4.13.1
    • PerfProfiler 4.13.1
      Perforce 4.13.1
    • ProjectExplorer 4.13.1
    • Python 4.13.1
    • QbsProjectManager 4.13.1
    • QmakeProjectManager 4.13.1
    • QmlDesigner 4.13.1
    • QmlJSEditor 4.13.1
    • QmlJSTools 4.13.1
    • QmlPreview 4.13.1
    • QmlProfiler 4.13.1
    • QmlProjectManager 4.13.1
    • Qnx 4.13.1
    • QtSupport 4.13.1
    • RemoteLinux 4.13.1
    • ResourceEditor 4.13.1
    • ScxmlEditor 4.13.1
      SerialTerminal 4.13.1
      SilverSearcher 4.13.1
      StudioWelcome 4.13.1
    • Subversion 4.13.1
    • TaskList 4.13.1
    • TextEditor 4.13.1
      Todo 4.13.1
      UpdateInfo 4.13.1
    • Valgrind 4.13.1
    • VcsBase 4.13.1
      WebAssembly 4.13.1
    • Welcome 4.13.1
      WinRt 4.13.1

    Qt Creator 4.13.1
    Based on Qt 5.15.1 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
    From revision 1da2c1f766
    Built on Sep 16 2020 01:19:29

    {noformat}

    $ sudo apt-get install openjdk-8-jre


  • Moderators

    In Kit settings, do you manually set "Qt mkspecs" field? This could cause it to assume android is being built.

    Please post an image of your Kit configuration, and your .pro file.



  • QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    CONFIG += c++11

    The following define makes your compiler emit warnings if you use

    any Qt feature that has been marked deprecated (the exact warnings

    depend on your compiler). Please consult the documentation of the

    deprecated API in order to know how to port your code away from it.

    DEFINES += QT_DEPRECATED_WARNINGS

    You can also make your code fail to compile if it uses deprecated APIs.

    In order to do so, uncomment the following line.

    You can also select to disable deprecated APIs only up to a certain version of Qt.

    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

    SOURCES +=
    main.cpp
    mainwindow.cpp

    HEADERS +=
    mainwindow.h

    FORMS +=
    mainwindow.ui

    Default rules for deployment.

    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target



  • @sierdzio said in Missing gcc (?) , C++ project wants android stuff:

    In Kit settings, do you manually set "Qt mkspecs" field? This could cause it to assume android is being built.

    Please post an image of your Kit configuration, and your .pro file.
    184b5b9c-d017-4563-a100-5264c2da569f-image.png

    The "Automatically create kits for Android.... was checked

    In the words of Bart SImpson - I didn't do it ....

    Now how do I get rig of all that other Java / Android "missing stuff??"


  • Moderators

    These are device settings, I was asking for Kit settings for the kit you are using. Since you don't want to compile/ run on Android, you can ignore Devices->Android and you can ignore those auto-generated Android kits. They are irrelevant here.

    We need to investigate why Qt Creator is trying to compile for Android when you select a Desktop kit (you do that right?).


Log in to reply