build, android: Fix Android GUI not loading on Qt 5.15

Qt 5.14 introduced certain breaking changes to the way it parses
AndroidManifest.xml metadata

https://lists.qt-project.org/pipermail/interest/2020-January/034372.html
This commit is contained in:
Igor Cota 2021-12-12 08:17:12 +01:00
parent 6fc5c772d4
commit 27f353d8ef
4 changed files with 21 additions and 6 deletions

View file

@ -394,8 +394,7 @@ bitcoin_qt_apk: FORCE
cp $(dir $(lastword $(CC)))../sysroot/usr/lib/$(host_alias)/libc++_shared.so $(APK_LIB_DIR)
tar xf $(QT_BASE_PATH) -C qt/android/src/ $(QT_BASE_TLD)src/android/jar/src --strip-components=5
tar xf $(QT_BASE_PATH) -C qt/android/src/ $(QT_BASE_TLD)src/android/java/src --strip-components=5
tar xf $(QT_BASE_PATH) -C qt/android/res/ $(QT_BASE_TLD)src/android/java/res --strip-components=5
cp qt/bitcoin-qt $(APK_LIB_DIR)/libbitcoin-qt.so
cp qt/bitcoin-qt $(APK_LIB_DIR)/libbitcoin-qt_$(ANDROID_ARCH).so
cd qt/android && gradle wrapper --gradle-version=6.6.1
cd qt/android && ./gradlew build

View file

@ -1,9 +1,7 @@
/.gradle
/build
/gradle/wrapper
/gradle
/gradlew*
/libs
/res/layout
/res/values*
/src/org/kde
/src/org/qtproject

View file

@ -32,7 +32,8 @@
<meta-data android:name="android.app.background_running" android:value="true"/>
<meta-data android:name="android.app.auto_screen_scale_factor" android:value="true"/>
<meta-data android:name="android.app.extract_android_style" android:value="default"/>
</activity>
<meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/>
</activity>
</application>
</manifest>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="load_local_libs">
<item>
arm64-v8a;libbitcoin-qt_arm64-v8a.so
</item>
<item>
armeabi-v7a;libbitcoin-qt_armeabi-v7a.so
</item>
<item>
x86_64;libbitcoin-qt_x86_64.so
</item>
<item>
x86;libbitcoin-qt_x86.so
</item>
</array>
</resources>