adap / flower

Flower: A Friendly Federated AI Framework
https://flower.ai
Apache License 2.0
5.07k stars 872 forks source link

android apk cannot be installed on android smartphone #1019

Open SHAO-Jiaqi757 opened 2 years ago

SHAO-Jiaqi757 commented 2 years ago

Describe what the documentation is missing.

I have tried to install the demo android app on the Xiaomi/Huawei smartphone, but it is failed for inadaptation with the OS.

Suggest your improvement.

No response

sisco0 commented 2 years ago

In the examples/android/client/app/build.gradle file you could find the build configuration for the current package. The targetSdkVersion and compileSdkVersion is set to 29, which refers to Android 10.0. Also, check out this issue https://github.com/adap/flower/issues/930 where I suggest adding different platforms as targets:

        include 'x86', 'armeabi-v7a', 'x86_64'

All the information you need for solving the issue is querying your device about its Android version and its CPU platform, where this second point could be checked out by running adb shell getprop ro.product.cpu.abilist. Kindly checkout also the APKs shared in the following linked Google Drive link if you do not want to compile by yourself and want to run a quick platform test after ensuring your Android version is greater or equal than 10. minSdkVersion is set to a lower version, so the referred issue states that the application could run under Android 8.1.0 without inconvenience as well.

https://drive.google.com/drive/folders/1kpygk5YIagLTWWjGXJ6PjHYPj3_KSNE9?usp=sharing