Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 4.7.0-rc1
-
None
Description
When using build.gradle file (for configure applicationId or version code) QtCreator can not build and run project. Thats happens because it using template AndroidManifest.xml file from project. But gradle in build step generate full AndroidManifest.xml file with real package name and version. Example defaultConfig for build.gradle file:
android { defaultConfig { applicationId "com.bugqtcreator.gradle" minSdkVersion 16 targetSdkVersion 27 versionCode 100 versionName "1.0.0" manifestPlaceholders = [ libName:"bugqtcreator" ] } /* Other setting */ }
QtCreator uses file: androidSourceDirectory+/AndroidManifest.xml
But correct file location (after gradle generation steps): outputDirectory+build/intermediates/manifests/full/debug/AndroidManifest.xml
My solution for androiddeployqt tool androiddeployqt github commit This workaround fix only build step. So QtCreator with that patched tool can build project (that using build.gradle defaultConfig option), but can not run it.
Another same (but not so critical) problem when using defaultConfig in build.gradle file: minSdkVersion, versionName, versionCode are read from template AndroidManifest.xml too. Not from full manifest generated by gradle in build step.