Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
When Android gradle build creates android-build folder with contents?
Before summer I created Android apps using ant. But now it is not supported by QtCreator. At July I have started turn all my apps to gradle. I am not a keen in gradle but this is needed to create aps for Android API level 26 as required by Google. I have successfully remake one app. But then I found a bug in Android libs. Therefore I have paused further remake. Recently Google fixed this bug and I continued remake. But I cannot remember all steps for ant to gradle turn... At summer I wrote notes but probably missed something. In first one app the build process creates folder android-build and writes inside it all files needed for APK creation and the APK itself. Same behavior I had when used ant - all older apps have this folder with output. But now I do not see android-build folder. Build process stops with the error "no libraries". Anybody who knows well all gradle build steps - please tell me when the android-build must be created and which one QtCreator setting or project line relates to this. I have broken my eyes while comparing working gradle project and non-working one. I do not see difference.
"QtCreator->Projects->Build Steps->Build Android APK ->Create Template" Button
@dheerendra Of course I used this button to copy needed gradle files - I have edit build.gradle to add link with Google Play Services lib. And I edit gradle.properties to enable manifestmerger. But android-build did not appear - not after Create Template button nor during build works.
@dheerendra has android-build appear during gradle works or not?
I found my mistake... It appears because of two paths interferention and was very weird.
Damn... I cannot tell why but button Create Template works strangely. Once it creates all set of gradle files but once it creates only some of them. Full set includes:
but sometimes when I strike this button and answer No to request replace my AndroidMainfest.xml and lib.xml - it does not create latest 4 files. I tried copy them from another project but without success - new project stops build with error message "Application .pro file not found, APK won't build". Of course all .pro files exist. But sometimes when Moon goes in some unknown angle to Jupiter... Button Create Template copies entire set of gradle files. In this case project builds successfully. I compared directories and files of both projects - they are not different in project settings.
DAMN!!! Looks like I found the reason. This stupid QtCreator does not select "running" module from previous QtCreator version. It just ignores which one subproject is "running".
This stupid QtCreator does not select "running" module from previous QtCreator version. It just ignores which one subproject is "running".
what option 'running' you are talking about ? Where is it ?
@dheerendra sorry not "running:. In English just Run or Run Configuration. I work with non-English QtCreator obviously.
Got it. Please share the solution here. It helps others as well. After that you can move the issue to SOLVED state.
@dheerendra the solution is quite simple - it's just needed before pressing Create Template select in Run Configuration the module containing main() function.