Qt Android project and CVS like Git, Perforce, etc.
-
Hi all,
I have developed and Android Application using Qt, which seems to work.
With Android/Qt, there are several files which are auto-generated or auto-updated by several tools.
This is a bit confusing to me, they are all located in sub-directory called android.
Can someone tell me which files in this sub-directory should be saved in CVS (e.g. git) and which should not?
Which can be edited, and which should not?This there any documentation available? I didn't find anything about this on doc.qt.io/qt-5/deployment-android.html
Best regards
-
Which can be edited, and which should not?
The problem here is that many of these files can be edited but don't have to be, it depends on your needs.
However, for most projects, I'd recommend keeping these in cvs:
- AndroidManifest.xml
- src folder (if you have any custom .java files)
- res folder (if you have custom icons etc.)
The rest can be ignored (.gitignore etc.).
-
@sierdzio thanks for answering. It is so hard to find any information about such a very important topic.
I have another question about building APK. I have started my Android project a year ago by following an example found on internet.
At this time, building APK with Qt Creator was done using Ant, now Ant is no more supported by Qt Creator 4.5 so I need to switch to Gradle.
Is there anything I have to be aware about?
Do you have some links to find useful information about Gradle -
@KroMignon said in Qt Android project and CVS like Git, Perforce, etc.:
At this time, building APK with Qt Creator was done using Ant, now Ant is no more supported by Qt Creator 4.5 so I need to switch to Gradle.
Is there anything I have to be aware about?No, in general it just works. The few "gotchas" are:
- gradle will add a bunch of files to your android directory -> they should be put into .gitignore
- recently Google is changing their API a lot. Very often after upgrading Android SDK, Qt builds will stop working and of course it takes a few days/ weeks to release an update Qt Creator. So I recommend trying out gradle build on some other PC, or do a backup (so that your current setup is not broken/ lost), and then once you find a working Android SDK that plays well with your Qt version and Qt Creator - do not update the SDK
-
Ah, one more thing: use Java JDK 8 (Oracle or OpenJDK - does not matter), not the newest version 9, because it does not work.
-
@KroMignon said in Qt Android project and CVS like Git, Perforce, etc.:
Does it make sense to update it to a newer version (eg 3.5.1)?
Uh, no idae, to be honest. I've never installed Gradle myself. I think it comes bundled with Android SDK nowadays.