Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Android] "Internal Error: Could not find .pro file."
Forum Updated to NodeBB v4.3 + New Features

[Android] "Internal Error: Could not find .pro file."

Scheduled Pinned Locked Moved Mobile and Embedded
15 Posts 6 Posters 7.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    I'm surprised it's working at all.

    SUBDIRS works like that:

    @SUBDIRS += Hash@

    and in your Hash folder you should have a Hash.pro file and yes the case is important.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vallidor
      wrote on last edited by
      #3

      Werid. That's how Qt Creator generated the .pro file, I just enclosed them in the config conditions.

      It has worked fine on Linux/X11 and Windows/Cygwin, deploys (make installs) correctly, so I didn't suspect those paths were the issue.

      I've changed the .pro file as you suggested and cleaned the build trees for both projects, re-ran qmake, rebuilt, and the error remains exactly as above.

      Since the dependency was a git repo of a different name, I renamed the .pro inside to match the name of the directory it is in (so, components.pro), as well as the .pro.user file. I've also tried removing the build directories and rebuilding the projects from scratch. The dependency itself is found and built when the project is built, only the deploy step fails.

      Rather than taking shots in the dark at what might be causing this, do you know off-hand what the error means? Which .pro file, where, and what does it do? Why is it looking for a .pro file after the build is complete, anyway?

      I've added some qDebug() lines to QmakeProFileNode::findProFileFor in my qtcreator source and I'm recompiling it. I'll be able to see what it's looking for and where, at least, and I'll post my findings as soon as I have some.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        As silly as it may sound, it's not finding one of your pro file. Does the log/compile/general console tell you which one ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vallidor
          wrote on last edited by
          #5

          Oh, that doesn't sound silly at all! Here's the information Qt Creator is providing to me:

          Issues is empty.

          Compile output has:

          @15:36:05: Internal Error: Could not find .pro file.
          Error while building/deploying project components (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.3.0))
          When executing step 'Deploy to Android device'@

          (and nothing else, just that).

          General messages is empty.

          My recompilation of Qt Creator is complete, though, and it says:

          @Scanning for .pro file for file: ""
          Checking path: "/home/nautilus/Flintlock/components/Audio/Audio.pro"
          Scanning for .pro file for file: ""
          Checking path: "/home/nautilus/Flintlock/components/Base64/Base64.pro"
          Scanning for .pro file for file: ""
          Checking path: "/home/nautilus/Flintlock/components/BooruImage/BooruImage.pro"
          Scanning for .pro file for file: ""
          Checking path: "/home/nautilus/Flintlock/components/config.pri"
          Checking path: "/home/nautilus/Flintlock/components/MediaSource/MediaSource.pro"
          Scanning for .pro file for file: ""
          Checking path: "/home/nautilus/Flintlock/components/DrawSurface/DrawSurface.pro"
          Scanning for .pro file for file: ""
          Checking path: "/home/nautilus/Flintlock/components/SerialFuelPrice/SerialFuelPrice.pro"
          Scanning for .pro file for file: ""
          Checking path: "/home/nautilus/Flintlock/components/File/File.pro"
          Scanning for .pro file for file: ""
          Checking path: "/home/nautilus/Flintlock/components/Hash/Hash.pro"
          Scanning for .pro file for file: ""
          Checking path: "/home/nautilus/Flintlock/components/config.pri"
          Checking path: "/home/nautilus/Flintlock/components/WebsocketListener/WebsocketListener.pro"
          Scanning for .pro file for file: ""@

          For this code:

          @const QmakeProFileNode *QmakeProFileNode::findProFileFor(const QString &fileName) const
          {
          qDebug() << "Scanning for .pro file for file: " << fileName;
          if (fileName == path())
          {
          qDebug() << "Found path: " << path();
          return this;
          }
          foreach (ProjectNode *pn, subProjectNodes())
          {
          qDebug() << "Checking path: " << pn->path();
          if (QmakeProFileNode *qmakeProFileNode = qobject_cast<QmakeProFileNode *>(pn))
          if (const QmakeProFileNode *result = qmakeProFileNode->findProFileFor(fileName))
          {
          qDebug() << "Found path: " << pn->path();
          return result;
          }
          }
          return 0;
          }@

          So it makes sense that it can't find a .pro file for ""...

          If you're curious, the error is hit at src/plugins/android/androiddeployqtstep.cpp +240:

          @
          if (!node) { // should never happen
          emit addOutput(tr("Internal Error: Could not find .pro file."), BuildStep::ErrorMessageOutput);
          return false;
          }
          @

          I'm going to assume by the comment there that I didn't do something terribly wrong to break it and I bumped into a bug of sorts, I'll try to reproduce it on a smaller scale and report it.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MiJo
            wrote on last edited by
            #6

            I had the same problem. I figured out what was going wrong. In my project I had the following QT dependencies:
            @
            QT += network xml xmlpatterns
            QT -= gui
            @

            This was created by project template for a static library.

            Compiling this gave this error:

            @
            14:35:53: Internal Error: Could not find .pro file.
            Error while building/deploying project Test-Android (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.4.0))
            When executing step "Build Android APK"
            @

            When adding Qt core dependency, everyhing was compiling again:
            @
            QT += core network xml xmlpatterns
            QT -= gui
            @

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MiJo
              wrote on last edited by
              #7

              I had the same problem. I figured out what was going wrong. In my project I had the following QT dependencies:
              @
              QT += network xml xmlpatterns
              QT -= gui
              @

              This was created by project template for a static library.

              Compiling this gave this error:

              @
              14:35:53: Internal Error: Could not find .pro file.
              Error while building/deploying project Test-Android (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.4.0))
              When executing step "Build Android APK"
              @

              When adding Qt core dependency, everyhing was compiling again:
              @
              QT += core network xml xmlpatterns
              QT -= gui
              @

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MiJo
                wrote on last edited by
                #8

                Correction on that last post, that wasn't the problem....

                A bit more detail, this project file
                @
                QT += network xml xmlpatterns

                QT -= gui

                TARGET = test3
                TEMPLATE = lib
                CONFIG += staticlib

                SOURCES += test3.cpp

                HEADERS += test3.h
                unix {
                target.path = /usr/lib
                INSTALLS += target
                }
                @

                gives this output:

                @
                14:55:28: Internal Error: Could not find .pro file.
                Error while building/deploying project test3 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.4.0))
                When executing step "Build Android APK"
                @

                Removing the TEMPLATE = lib line does build.
                It does not matter if you try to create a static or dynamic library, both of them will fail.

                So it seems there is a bug in building libraries for Android?

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  MiJo
                  wrote on last edited by
                  #9

                  Correction on that last post, that wasn't the problem....

                  A bit more detail, this project file
                  @
                  QT += network xml xmlpatterns

                  QT -= gui

                  TARGET = test3
                  TEMPLATE = lib
                  CONFIG += staticlib

                  SOURCES += test3.cpp

                  HEADERS += test3.h
                  unix {
                  target.path = /usr/lib
                  INSTALLS += target
                  }
                  @

                  gives this output:

                  @
                  14:55:28: Internal Error: Could not find .pro file.
                  Error while building/deploying project test3 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.4.0))
                  When executing step "Build Android APK"
                  @

                  Removing the TEMPLATE = lib line does build.
                  It does not matter if you try to create a static or dynamic library, both of them will fail.

                  So it seems there is a bug in building libraries for Android?

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    ssolomin
                    wrote on last edited by
                    #10

                    I've seen simular problem when try build lib with Qt5.4 and Qt Creator. And I've found workaround: go to the "project" tab and switch off "Make install" and "Build Android APK" steps.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      ssolomin
                      wrote on last edited by
                      #11

                      I've seen simular problem when try build lib with Qt5.4 and Qt Creator. And I've found workaround: go to the "project" tab and switch off "Make install" and "Build Android APK" steps.

                      1 Reply Last reply
                      1
                      • F Offline
                        F Offline
                        frankem
                        wrote on last edited by
                        #12

                        Thanks, that worked for me.

                        [quote author="ssolomin" date="1419954269"]I've seen simular problem when try build lib with Qt5.4 and Qt Creator. And I've found workaround: go to the "project" tab and switch off "Make install" and "Build Android APK" steps.[/quote]

                        1 Reply Last reply
                        0
                        • F Offline
                          F Offline
                          frankem
                          wrote on last edited by
                          #13

                          Thanks, that worked for me.

                          [quote author="ssolomin" date="1419954269"]I've seen simular problem when try build lib with Qt5.4 and Qt Creator. And I've found workaround: go to the "project" tab and switch off "Make install" and "Build Android APK" steps.[/quote]

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            jonathanz
                            wrote on last edited by
                            #14

                            Thanks for the discussions. The above workaround also works for me:

                            In Qt5.4.0-based Qt Creator 3.3.0, go to "Projects" -> "Build"

                            • Disable "Make install".

                            • Disable "Build Android APK".

                            Then my library project will build successfully.

                            Is there any plan to fix this issue by the Qt Projecr team?

                            1 Reply Last reply
                            0
                            • J Offline
                              J Offline
                              jonathanz
                              wrote on last edited by
                              #15

                              Thanks for the discussions. The above workaround also works for me:

                              In Qt5.4.0-based Qt Creator 3.3.0, go to "Projects" -> "Build"

                              • Disable "Make install".

                              • Disable "Build Android APK".

                              Then my library project will build successfully.

                              Is there any plan to fix this issue by the Qt Projecr team?

                              1 Reply Last reply
                              0

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved