47
edits
(Mention required version of Platform-tools) |
Peterkohaut (talk | contribs) (Update for new toolchain) |
||
Line 5: | Line 5: | ||
= Mandatory tools = | = Mandatory tools = | ||
* | * Android SDK Manager from Android Studio or from Command line tools - https://developer.android.com/studio | ||
Use the SDK Manager to install: | Use the SDK Manager to install: | ||
* | * Platform tools | ||
* | * Build Tools 29.0.3 | ||
* | * SDK Platform API 29 | ||
* NDK 21.0.6113669 | |||
Set the <tt> | Set the <tt>ANDROID_SDK_ROOT</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK_ROOT</tt> to the root directory of the NDK - default installation: <tt>${ANDROID_SDK_ROOT}/ndk/21.0.6113669</tt> | ||
= Optional libraries = | = Optional libraries = | ||
Line 28: | Line 28: | ||
== Build the libraries yourself == | == Build the libraries yourself == | ||
Here's a a simple script to set up a shell for crosscompiling: | Warning: this sections is not yet updated for new Android toolchain | ||
Here's a a simple script to set up a shell for crosscompiling for <tt>arm-v7a</tt>: | |||
#!/bin/sh | #!/bin/sh | ||
Line 105: | Line 107: | ||
The Android port can be compiled with the <tt>configure</tt> script. | The Android port can be compiled with the <tt>configure</tt> script. | ||
The most basic way to accomplish this is to run: | The most basic way to accomplish this is to run: | ||
./configure --host=android -- | ./configure --host=android-arm-v7a | ||
make | make | ||
Line 118: | Line 118: | ||
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>/opt/android/3rd-android-4-armeabi</tt>, the <tt>configure</tt> command line would look like this: | If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>/opt/android/3rd-android-4-armeabi</tt>, the <tt>configure</tt> command line would look like this: | ||
./configure --host=android | ./configure --host=android-arm-v7a --with-tremor-prefix=/opt/android/3rd-android-4-armeabi --with-mad-prefix=/opt/android/3rd-android-4-armeabi --with-flac-prefix=/opt/android/3rd-android-4-armeabi | ||
Supported hosts: | |||
* <tt>android-arm-v7a</tt> - for older Android devices | |||
* <tt>android-arm64-v8a</tt> - for all new Android devices | |||
* <tt>android-x86</tt> - ideal for emulator with 32bit images | |||
* <tt>android-x86_64</tt> - ideal for emulator with 64bit images | |||
= Android Studiosetup = | |||
After compiling there in the build directory (if used) there will be a new directory called <tt>android-project</tt>, this can be opened by Android Studio. C files are not yet available , but it sis possible edit Java files and debug both Java & native code (in emulator or on a real device via <tt>adb</tt> connection). | |||
To enable debugging, after opening the <tt>android-project</tt> directory change <tt>Project configuration</tt>, under tab <tt>Debugger</tt>, set field <tt>Debug type</tt> to <tt>Dual</tt> |
edits