Android Manifest version update
-
Hi all,
there are some escape sequences which can be used in AndroidManifest.xml to automatically set values according to Qt project settings like:
-- %%INSERT_APP_LIB_NAME%% ---- %%INSERT_APP_NAME%% --
Do somebody know if a sequence exists to insert
VERSIONwhich is defined PRO file?
Is it possible to get an exhaustive list of all available escape sequences? -
Hi all,
there are some escape sequences which can be used in AndroidManifest.xml to automatically set values according to Qt project settings like:
-- %%INSERT_APP_LIB_NAME%% ---- %%INSERT_APP_NAME%% --
Do somebody know if a sequence exists to insert
VERSIONwhich is defined PRO file?
Is it possible to get an exhaustive list of all available escape sequences?@KroMignon I reply to myself, I think this could be useful for other developers.
Escape sequences which I found (extract from source code!):
-- %%INSERT_APP_NAME%% --correspond to qmake settingTARGET-- %%INSERT_APP_LIB_NAME%% --(same as above)-- %%INSERT_VERSION_NAME%% --correspond to qmake settingANDROID_VERSION_NAME-- %%INSERT_VERSION_CODE%% --correspond to qmake settingANDROID_VERSION_CODE
-
@KroMignon I reply to myself, I think this could be useful for other developers.
Escape sequences which I found (extract from source code!):
-- %%INSERT_APP_NAME%% --correspond to qmake settingTARGET-- %%INSERT_APP_LIB_NAME%% --(same as above)-- %%INSERT_VERSION_NAME%% --correspond to qmake settingANDROID_VERSION_NAME-- %%INSERT_VERSION_CODE%% --correspond to qmake settingANDROID_VERSION_CODE
While looking for a way to use INSERT_VERSION_NAME and INSERT_VERSION_CODE I came across your post.
I have added to my .pro
ANDROID_VERSION_NAME = "3" ANDROID_VERSION_CODE = 2.4.0This is similar as I used before in creator's manifest editor.
However, when rerun qmake and deploy my app I got* What went wrong: Execution failed for task ':processDebugResources'. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource linking failed R:\build-App1-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Release\android-build\build\intermediates\merged_manifests\debug\AndroidManifest.xml:2: AAPT: error: invalid android:versionCode '2.4.0'.I have checked also with same result
ANDROID_VERSION_NAME = "3" ANDROID_VERSION_CODE = "2.4.0"What is missing?
-
I think this would be also helpful to you
https://doc.qt.io/qt-6/android-manifest-file-configuration.html