Issue
I created recently a simple "Hello World" Android NDK project in Android Studio and tried to play with the gradle / cmake / clang build system.
I created a main.c file containing the main method:
#include <stdio.h>
int main()
{
printf("Hello, world");
return 0;
}
My cmakelist.txt file will compile this file using Android NDK toolchain to generate the executable that I named ndk_example_c:
add_executable( # Sets the name of the library.
ndk_example_c
# Provides a relative path to your source file(s).
main.c
)
gradle/cmake generates 4 binaries for the 4 default ABIs:
- armeabi-v7a
- arm64-v8a
- x86
- x86_64
I managed to run the arm abi executables on an Android device using adb shell. However, I expected to be able to run the x86 and x86_64 executables on Windows or Linux, but the binaries doesn't seem to be standard executables.
So, my question is: what is the target platform / OS of the x86 and x86_64 binaries generated by gradle? Did anyone manage to run them?
Thanks,
Solution
The most useful target platform for x86 or …64 is an Android emulator, which you can run via AVD without leaving Android Studio. There are other emulators, which may deliver better performance or additional features.
Another platform for these Android APKs is a ChromeBook. There is an independent effort to bring Android to any PC. Note that you may need some tuning for your app to look good on the big screen.
Finally, there exist some Android devices that feature Atom CPU. The phones like Asus ZenFone 2 are not very common these days, but you could find some STBs that use x86.
Answered By - Alex Cohn
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.