I've been working on the Android toolchain, mainly to try and get C++11 support working and since I was making changes to the toolchains I ended up modifying some things that will mean you need to update your environment.
These instructions assume that you've got a default environment. That is, with the toolchain installed to /opt/android/android-9
1 - Lets clean a few things up first
- Go to echoinstaller/AndroidDevelopment and remove the existing ndk folder - android-ndk-r9d or android-ndk-r10d, depending on when you last updated.
- Go to /opt/android and remove android-9
- Go to echoinstaller/echo-dependencies and delete the android and opt/android folders
2 - Update the three E's - echo3, echoinstaller and echo-dependencies
3 - Run SetupAndroidDevelopment.sh
Optional: You can modify this script to not download and set up toolchains for android-15 and android-19 if you like (though you might just like to get it now ready for future updates). Modify the lines:
NDK_PLATFORM_VERSIONS="android-9 android-15 android-19" -> NDK_PLATFORM_VERSIONS="android-9"
NDK_PLATFORM_VERSIONS="android-9 android-15 android-19" -> NDK_PLATFORM_VERSIONS="android-9"
ANDROID_SDK_PACKAGES="platform-tools,android-10,android-15,android-19" -> ANDROID_SDK_PACKAGES="platform-tools,android-10"
It looks confusing here because android-10 is the lowest SDK package for Android 2.3.3 but we the standalone toolchain uses android-9 for that target. So don't remove android-10.
The set up script will download what it needs, build the toolchains and remove existing variables defined in .profile then add the latest ones.
4 - Build dependencies
Now that you've logged back in. Open a command window at echo-dependencies and execute ./edepbuild android wait for it to complete. If there are any errors, please let me know and I'll help you sort it out.
5 - Update NetBeans build tools
There are two ways to do this. You can either manually do it or import
Manual setup - Open Tools -> Options -> C/C++ and under Build Tools:
- Remove Android_9
- Add a new tool collection:
Base Directory: /opt/android/android-9/arm-linux-androideabi-4.9/bin
Type: GNU
Name: Android_9
Set the tools:
C Compiler: /opt/android/android-9/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc
C++ Compiler: /opt/android/android-9/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-g++
Fortran Compiler: leave blank, we don't use it.
Assembler: /opt/android/android-9/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-as
Other settings should be fine for system defaults (for now).
Do the same again for a collection named Android_15 using /opt/android/android-15/arm-linux-androideabi-4.9/bin as the base.
And finally again for a collection named Android_19 using /opt/android/android-19/arm-linux-androideabi-4.9/bin as the base.
Your Android tools should be ready.
6 - Build Echo
You are supposed to be able to use BuildEcho.sh to build:
PLATFORMS="android" ./BuildEcho.sh
But that failed for me without first setting the path to include the toolchain:
PATH="/opt/android/android-9/arm-linux-androideabi-4.9/bin:$PATH" PLATFORMS="android" ./BuildEcho.sh
I suggest opening the IDE and build the project.
That should be about it. Project settings shouldn't need modifying but let me know if you run into any problems.
- Projects
- Subscribers
- Timotheos