-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Android] How to build project
Aleksandr Zatsepin edited this page Dec 14, 2017
·
20 revisions
First of all, you have to install these required components:
Android SDK, NDK (now, it's 13b version, but the new one should work as well), CMake (only from android sdk manager, because android uses its own/custom Cmake implementation), LLDB (if you want to be able to debug native code).
After all required components are installed do these steps:
- Clone or download MapsMe code from the current repo.
- Execute the script omim/tools/android/set_up_android.py . This script creates the local.properties file for you where sdk/ndk paths are specified. But, you can provide the mentioned paths manually, thought Android Studio: File->Project Structure->SDK Location.
- Execute the script omim/configure.sh and follow the prompts.
- To build project you have to use gradle wrapper. Wrapper downloads all needed dependencies for you. Project has a lot of configurations which you can see in build.gradle file. For example to buil Web Debug version of app you should do following command staying in omim/android folder:
./gradlew assemplWebDebug (or ./gradlew aWD - is the short form). Also you can provide optional parameters: -Parm(build only for ARM arch), -Px86(build only for x86 arch)). - If building is completed without errors the apk file will be found in omim/android/build/outputs/apsk folder, if errors are encountered please let me know!