Android: fix apk generation on Android API 23+

Starting with Android API 23+ gradle enables uncompressed native libs by default.
We must set android.bundle.enableUncompressedNativeLibs = false to gradle.properties,
to force it to compress them and extract them on the device.

Fixes: QTBUG-80766
Change-Id: Ia6d8d9179a341bbe7f8dc254a3b31d2ee8d7a5d7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
BogDan Vatra 2020-03-02 14:27:45 +02:00
parent bf059f6133
commit 6806cb341c

View File

@ -2295,6 +2295,7 @@ bool buildAndroidProject(const Options &options)
QString gradlePropertiesPath = options.outputDirectory + QLatin1String("gradle.properties");
GradleProperties gradleProperties = readGradleProperties(gradlePropertiesPath);
gradleProperties["android.bundle.enableUncompressedNativeLibs"] = "false";
gradleProperties["buildDir"] = "build";
gradleProperties["qt5AndroidDir"] = (options.qtInstallDirectory + QLatin1String("/src/android/java")).toUtf8();
gradleProperties["androidCompileSdkVersion"] = options.androidPlatform.split(QLatin1Char('-')).last().toLocal8Bit();