Author |
Topic  |
|
aleit
Pulcino

Italy
55 Posts |
Posted - 23/07/2020 : 10:08:03
|
I successfully setup android studio to compile a debug lk8000 apk.
My problem is that that the conditional:
#ifdef __arm__ is always false when I run the apk in the target device (I'm working on color e-ink support).
So, all the code that depends on that conditional is not executed. What should I do to compile it properly? Unfortunately I am not familiar with C++ and android studio. |
|
brunotl
Pterodattilo
    
France
1154 Posts |
Posted - 23/07/2020 : 20:23:22
|
what is the target device abi ? |
 |
|
aleit
Pulcino

Italy
55 Posts |
Posted - 23/07/2020 : 20:44:44
|
I don't know, I did not set it because I don't know what it is and how to set it. I just exported the code from github, import it in android studio and then do Build -> Make Project from the menu. I copied the generated file android-studio/app/build/outputs/apk/debug/LK8000-7.1p-debug.apk from the computer to the device and installed it, where it works except that #ifdef __arm__ parts are not taken into account. The device where I test the apk is an HiSense A5 Pro CC. By the way, I can't run LK8000 in the emulator because after it starts I just see a black screen (even tough sound and mouse clicks seem to work), I don't know if this is related.
|
Edited by - aleit on 23/07/2020 20:48:29 |
 |
|
aleit
Pulcino

Italy
55 Posts |
Posted - 24/07/2020 : 12:11:59
|
I tried to set the abi: menu Build -> Select Build Variant then I set "Active ABI" to armeabi-v7a, rebuild everything, but didn't work: still __arm__ not defined. Same thing for arm64-v8a.
I even tried doing: menu Build -> Edit Build Types -> Variables -> :app -> new variable set __arm__ to value "y" with no luck :-( |
 |
|
brunotl
Pterodattilo
    
France
1154 Posts |
Posted - 25/07/2020 : 17:05:23
|
abi depends of target device only, so for arm64 device "__arm__" is not defined, instead "__aarch64__" is defined ... |
 |
|
aleit
Pulcino

Italy
55 Posts |
Posted - 25/07/2020 : 23:57:33
|
thank you, this is exactly what I needed to know! |
 |
|
aleit
Pulcino

Italy
55 Posts |
Posted - 26/07/2020 : 08:29:46
|
Could you give me a hint on the correct way to compile for android with DITHER and GREYSCALE defined? |
 |
|
brunotl
Pterodattilo
    
France
1154 Posts |
Posted - 26/07/2020 : 15:22:49
|
"DITHER" and "GREYSCALE" can't be defined for OpenGL Target and Android is OpenGl target. |
 |
|
|
Topic  |
|