Values of AndroidManifest-Template are ignored, except some special settings like “uses-feature … required=false” which make it into the final app.
Most “base-values” get ignored and come from somewhere else.
VersionCode:
ignores the value of AndroidManifest
cant figure out how i can set it
Versionname:
Project.xml overwrites the value in Androidmanifest.
minSdkVersion:
ignores the value of AndroidManifest
ignores the value of Project.xml
always 9, cant figure out how i can set it
targetSdkVersion:
ignores the value of AndroidManifest
if i add it to the Project.xml it is used, else 19
I always thought that the values in AndroidManifest are the “final” values - ie. overwriting all other/previous values.
Or, what could be the reason for those “base-values” being ignored/overwritten?
If i use
<template path="g-manifests/template-a.xml" rename="app/src/main/AndroidManifest.xml" />
or
<template path="templates" /> - with a folder structure like (android/template/app/src/main/AndroidManifest.xml) inside
doesnt change the result.
(I probably have this problem since the change to Openfl4)
I dont get the Manifest-Merging.
My template-android-manifest ends up in Export/android/release/bin/app/src/main/ with all its values.
ManifestmergerReport reports “merging” 3-times the same file!?
android:versionName
ADDED from /DisplayingABitmap/Export/android/release/bin/app/src/main/AndroidManifest.xml:2:142-169
INJECTED from /DisplayingABitmap/Export/android/release/bin/app/src/main/AndroidManifest.xml
INJECTED from /DisplayingABitmap/Export/android/release/bin/app/src/main/AndroidManifest.xml
Still, the Manifest-template-values get overwritten by the different values from “gradle.properties”
For now my workaround, to set all base values is another template:
You can sort of tell what the project.xml values are by looking at the original “gradle.properties” file, before it has been processed:
versionCode is automatically generated, based on the number of builds you have done for your project. Otherwise you can override using <meta build-number="1000" /> or you can also do things like <meta build-number="git" /> and <meta build-number="git+1000" /> if the project is under version control
Android build target SDK version is <config:android target-sdk-version="" /> and build min SDK version is <config:android minimum-sdk-version="" />, if I remember correctly