[Android] "Internal Error: Could not find .pro file."
-
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.
-
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
@ -
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
@ -
Correction on that last post, that wasn't the problem....
A bit more detail, this project file
@
QT += network xml xmlpatternsQT -= gui
TARGET = test3
TEMPLATE = lib
CONFIG += staticlibSOURCES += 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?
-
Correction on that last post, that wasn't the problem....
A bit more detail, this project file
@
QT += network xml xmlpatternsQT -= gui
TARGET = test3
TEMPLATE = lib
CONFIG += staticlibSOURCES += 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?
-
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]
-
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]
-
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?
-
-
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?
-