Android build now fails (used to work)
-
Thanks for the suggestions, guys.
@piervalli unfortunately Qt Creator doesn't seem to show up in Process Explorer, so I can't get much help from it. I don't think the issue is a file lock, anyway.
@KenAppleby-0 my project only generates one executable (either for desktop or for Android). No whitespace in pathnames. And the directory structure I'm using used to build fine. (Still does for desktop.) I moved the project and tried to build -- same results.
I've done a little more looking, and I notice that the file in question (as well as all of the files in the android-build directory) are all 444 (read-only for everyone). Might this have something to do with my problem?
I also don't understand why the build process is trying to remove that file in the first place; it just put it there. I really don't understand the Android build process.
Any suggestions? Thanks...
@mzimmers said in Android build now fails (used to work):
the build process is trying to remove that file in the first place
This file at the place is a copy of the one you setup. Every time it has to be replaced in build because it may be changed. This is reasonable.
-
@mzimmers said in Android build now fails (used to work):
the build process is trying to remove that file in the first place
This file at the place is a copy of the one you setup. Every time it has to be replaced in build because it may be changed. This is reasonable.
-
@JoeCFD OK, but where is the original file? It isn't from my project android folder -- that file is different, and has a different datestamp. Where is the file coming from?
@mzimmers AndroidManifest.xml is an important file and located normally under android dir. Qt gives the flexibility for the user to put it anywhere and it can be set in qmake or cmake file with path. But it has a fixed location in build dir and is a copy of the one you set-up. For example,mine is under buildfiles/android
-
@mzimmers AndroidManifest.xml is an important file and located normally under android dir. Qt gives the flexibility for the user to put it anywhere and it can be set in qmake or cmake file with path. But it has a fixed location in build dir and is a copy of the one you set-up. For example,mine is under buildfiles/android
@JoeCFD Here's the complete error messaging:
Can't remove old file: C:/Users/Michael.Zimmers/Qt_projects/build-nga_demo-Android_Qt_6_4_2_Clang_arm64_v8a-Release/android-build/AndroidManifest.xml 16:17:05: The process "C:\Qt\6.4.2\mingw_64\bin\androiddeployqt.exe" exited with code 3. Error while building/deploying project nga_demo (kit: Android Qt 6.4.2 Clang arm64-v8a) When executing step "Build Android APK"Code 3 is "the system cannot find the specified path" which makes no sense, as that path is definitely there.
-
@JoeCFD Here's the complete error messaging:
Can't remove old file: C:/Users/Michael.Zimmers/Qt_projects/build-nga_demo-Android_Qt_6_4_2_Clang_arm64_v8a-Release/android-build/AndroidManifest.xml 16:17:05: The process "C:\Qt\6.4.2\mingw_64\bin\androiddeployqt.exe" exited with code 3. Error while building/deploying project nga_demo (kit: Android Qt 6.4.2 Clang arm64-v8a) When executing step "Build Android APK"Code 3 is "the system cannot find the specified path" which makes no sense, as that path is definitely there.
-
@mzimmers can you copy your xml file to the place? Then it will be available. If it is read only, build will not work either.
-
@JoeCFD I've tried that. No luck. It gets replaced with the "mystery version."
Regarding permissions: here's what Windows thinks:
BUT: This from a MINGW64 window:
So...I truly don't know what's going on.
@mzimmers It could be a Qt bug in qtcreator as well although it may not be. Otherwise, there will be more people who will complain. Check write permissions of all parent dirs of build dir. You can see gradle stuff and xml file will be copied there every time in build. Check out how to set permissions for the whole dir. I am not in the office and can not check the build commands of QtCreator.
-
@mzimmers It could be a Qt bug in qtcreator as well although it may not be. Otherwise, there will be more people who will complain. Check write permissions of all parent dirs of build dir. You can see gradle stuff and xml file will be copied there every time in build. Check out how to set permissions for the whole dir. I am not in the office and can not check the build commands of QtCreator.
-
@JoeCFD doubtful that it's a Qt bug -- this used to work, and I haven't updated lately.
I copied my project to a different folder - same result.
Weird, huh?
-
@JoeCFD said in Android build now fails (used to work):
@mzimmers It is a Windows problem. Somehow, the write permissions of build dir are gone.
Hmm...I did update Windows recently. Aargh...fortunately, I'm getting a Linux box soon.
I wonder if this is worth reporting...
-
@JoeCFD said in Android build now fails (used to work):
@mzimmers It is a Windows problem. Somehow, the write permissions of build dir are gone.
Hmm...I did update Windows recently. Aargh...fortunately, I'm getting a Linux box soon.
I wonder if this is worth reporting...
-
@JoeCFD I've tried that. No luck. It gets replaced with the "mystery version."
Regarding permissions: here's what Windows thinks:
BUT: This from a MINGW64 window:
So...I truly don't know what's going on.
@mzimmers More arbitrary thoughts:
-
Are the contents of the "mystery version" the same as the one in your Qt6.4 installation, which would be in c:/Qt/Qt6.4.2/android_arm64_v8a/src/android/templates/AndroidManifest.xml or somewhere similar?
It may be that during the build process Qt copies the default template version to the build directory first, then overwrites it with your project version. If this is the case, it would be worth looking at the permissions on the file in the Qt templates directory. -
Try creating yourself a new Windows user (I would say one without the "." in the pathname) and building the project afresh from there.
-
And another possible thing to try is to completely uninstall Qt and reinstall.
-
-
@mzimmers More arbitrary thoughts:
-
Are the contents of the "mystery version" the same as the one in your Qt6.4 installation, which would be in c:/Qt/Qt6.4.2/android_arm64_v8a/src/android/templates/AndroidManifest.xml or somewhere similar?
It may be that during the build process Qt copies the default template version to the build directory first, then overwrites it with your project version. If this is the case, it would be worth looking at the permissions on the file in the Qt templates directory. -
Try creating yourself a new Windows user (I would say one without the "." in the pathname) and building the project afresh from there.
-
And another possible thing to try is to completely uninstall Qt and reinstall.
@KenAppleby-0 said in Android build now fails (used to work):
It may be that during the build process Qt copies the default template version to the build directory first, then overwrites it with your project version. If this is the case, it would be worth looking at the permissions on the file in the Qt templates directory.
Bingo. I'd recently set my Qt folder to readonly in order to protect against inadvertent overwrites. This was indeed the culprit. I reinstalled 6.4.2 and I can build now. (I have a deployment problem, but I'll bring that up in a separate topic.)
Thanks to everyone who helped with this.
-
-
M mzimmers has marked this topic as solved on