topic "Android builder";
[#a83;*R6 $$1,0#31310162474203024125188417583966:caption]
[b42;a42;ph2 $$2,2#45413000475342174754091244180557:text]
[#b83;*4 $$3,2#07864147445237544204411237157677:title]
[=b83;*R6 $$4,4#6A74CB453EB7CE8DFD488A3B779BFC66:Image]
[=b42;a67;1 $$5,5#F40424D1E3D034230FCED72E1FBFF1B7:Image description]
[b42;a42;ph2 $$6,6#2B3312EDFCF5DDA907D8823BB2222FBD:TextEnumaration]
[# $$0,0#00000000000000000000000000000000:Default]
[{_}%EN-US 
[s1; Working with Android builder&]
[s3; 1. Introduction&]
[s2; Android is lead mobile operating system all over the world. 
In this reference, we want to show you how you can work with 
its development tools inside TheIDE.&]
[s2; We will use abbreviations and terms that may be unknown for 
beginners and new users. Below is the list with the most important 
ones:&]
[s6;l160;i150;O0; [* Android SDK] `- Android software development kit&]
[s6;l160;i150;O0; [* Android NDK] `- Android native development kit&]
[s6;l160;i150;O0; [* JDK] `- Java development kit&]
[s2; This tutorial is divided into nine chapters. The second and 
third chapters describe things related to Android SDK. Fourth 
chapter shows how to create Android builder. Next chapter is 
devoted to the process of creation Android Builder. Fifth chapter 
shows how to link Android NDK with Android Builder. After that, 
all configuration options related to Android Builder will be 
described. The last chapters refer to things related with this 
tutorial.&]
[s3; 2. Downloading Android SDK&]
[s2; First of all you will need to download Android SDK from the 
official site. You can do this by clicking on following URL: [^https`:`/`/developer`.android`.com`/studio`/index`.html^ h
ttps://developer.android.com/studio/index.html]. On the site, 
please find paragraph `"Get just the command line tools`" and 
select the version suited to your current operating system. If 
you are interested, you can download the SDK with `"Android Studio`", 
but it is not required by TheIDE.&]
[s4; 
@@rawimage:2454&1182
([encoded data, 70488 characters])
&]
[s5; Official Android SDK download site&]
[s2; When you download Android SDK you will need to install it. This 
operation can be different depending on which platform you are 
using. Sometimes you need to unpack the archive (Linux), another 
time you need to launch the installer (MS Windows).&]
[s3; 3. Configuring Android SDK&]
[s2; When Android SDK is successfully installed, we need to prepare 
it for our needs.&]
[s2; One of the essential tool is `"Android SDK Manager`". It helps 
managing Android SDK components. The entire tool is simply GUI 
application. To launch it, go to `$(SDK`_PATH)/tools/ and launch 
[/ android] (on Linux) or [/ android.exe] (on MS Windows)). Alternatively 
after creating Android builder you receive the ability to launch 
this application from TheIDE. Make sure you have selected properly 
constituted build method related to Android Builder, because 
only this guarantees the availability of this option.&]
[s4; 
@@rawimage:2438&1845
([encoded data, 198376 characters])
&]
[s5; Android SDK Manager&]
[s2; After the first launch of `"Android SDK Manager`" it automatically 
detects the most important packages to install. So, we don`'t 
need to worry about potential selections. The only thing we should 
do in this window is pressing the `"Install`" button. Afterward, 
on your display should appear a window containing license agreements. 
To download packages you are obligated to accept them. At the 
end, we need to press `"Install`" button once again, but this 
time it is located in the currently window.&]
[s4; 
@@rawimage:2000&1270
([encoded data, 122536 characters])
&]
[s5; Window with license agreements&]
[s2; After accepting licenses the download process should begin. 
To finish configuring SDK you must wait for the end of the process. 
It may take awhile (It mostly depends on your internet download 
rate).&]
[s0;b42;a42; [/2 Attention: If you are Android SDK expert or you know 
what are you doing you can select packages manually. In this 
paragraph, we showed the fastest way to the successful configure 
Android SDK.]&]
[s3; 4. Creating Android builder&]
[s2; The next big step is creating Android builder inside TheIDE. 
This operation will allow us to write and build an application 
on Android. To do this, you will need to open `"Build methods`" 
window (TheIDE menu`-bar Setup `-> Build methods..) and create 
method. You can do this by moving mouse cursor to methods list 
and right click on it. Then, menu bar should appear. You need 
to select `"Insert row`" entry. We created an empty method with 
no name. Therefore, you have to name your build method. The name 
does not matter, but for the purposes of this tutorial we call 
it `"AndroidBuilder`". Please notice that method must have a 
name. Otherwise, we will not be able  to close the `"Build methods`" 
window. In the next step we are going to choose builder type. 
You can do this by clicking on `"Builder`" drop list and selecting 
`"ANDROID`" entry.&]
[s4; 
@@rawimage:2000&1494
([encoded data, 88552 characters])
&]
[s5; Build methods window with the newly formed Android builder&]
[s2; After that, we need to set the JDK path. You can do this by 
choosing a directory inside `"JDK path`" field. Before you start 
setting directory, please make sure that you possess appropriate 
JDK version. The current version of Android SDK supports [* Java 
up to version 7]. If you don`'t have JDK or you have a version 
that doesn`'t meet the requirements, you can download it from 
the official site: [^http`:`/`/www`.oracle`.com`/technetwork`/java`/javase`/downloads`/index`.html^ h
ttp://www.oracle.com/technetwork/java/javase/downloads/index.html].&]
[s2; To finish creating Android builder process, we need to set the 
Android SDK path. The field used for its settings `"Android SDK 
Path`". Before you setup path, make sure you have installed and 
configured correctly Android SDK. This process was described 
in two previous chapters. Please notice that if the path is correct, 
the options related to Android SDK should be detected automatically.&]
[s2; After you perform all previous steps you need to press `"OK`" 
button to save your new method. From now you will be able to 
write core Android applications using Java programming language.&]
[s0;b42;a42; [/2 Attention: On MS Window may occur problems with 64 
bit Java version, so please be careful.]&]
[s3; 5. Linking Android builder with Android NDK&]
[s2; Ultimate`+`+ is C`+`+ framework, so it is natural that we want 
to write applications in that language. To do that we need to 
link Android builder with Android NDK. NDK by default allows 
writing application on Android using C/C`+`+.&]
[s2; First of all we need to download NDK from official site: [^https`:`/`/developer`.android`.com`/ndk`/downloads`/index`.html^ h
ttps://developer.android.com/ndk/downloads/index.html]. On the 
site, you will need to select the version suited to your operating 
system. After that, we need to execute the downloaded binary. 
This task will start the NDK components download/decompression 
process. It may take awhile, so please be patient. After the 
completion of the process, we should see completed installation 
of NDK on our hard drive. It will be on a directory where we 
executed downloaded binary.&]
[s4; 
@@rawimage:2000&1185
([encoded data, 76748 characters])
&]
[s5; Official Android NDK download site&]
[s2; Now we are going to tell our builder where NDK is located. To 
do that open `"Build methods..`" and select `"ANDROID`" build 
method. The one we created in `"Creating Android builder`" paragraph. 
Next, you have to specify NDK directory in `"Android NDK path`" 
edit field. After successful Android NDK connection with the 
builder, fields `"Toolchain`" and `"C`+`+ runtime`" should be 
detected automatically. At the end, we are saving changes in 
our build method by clicking `"OK`" button.&]
[s3; 6. Configuring Android builder&]
[s2; Android builder is a powerful tool, so it allows configuration. 
Below is a list with all options grouped in two categories. The 
first group described options related to Android SDK. The second 
one is related to Android NDK.&]
[s2; Android SDK settings:&]
[s6;l160;i150;O0; Platform version `- select android platform version&]
[s6;l160;i150;O0; Build tools version `- select android build tools 
version&]
[s2; Android NDK settings:&]
[s6;l160;i150;O0;~~~32; BLITZ `- turn on/off BLITZ technology.&]
[s6;l160;i150;O0;~~~32; Target architectures `- specify which architecture 
binaries will be built&]
[s6;l160;i150;O0;~~~32; Toolchain `- specify compiler which will 
be used to compile source files `- entries without text refer 
to GCC&]
[s6;l160;i150;O0;~~~32; C`+`+ runtime `- specify runtime library 
`- please notice that this flag can turn on/off language specific 
features like availability of standard library or exception handling&]
[s6;l160;i150;O0;~~~32; Common C`+`+ options `- compilation flags 
used with C`+`+ source files&]
[s6;l160;i150;O0;~~~32; Common C options `- compilation flags used 
with C source files&]
[s3; 7. Tips and tricks&]
[s2; Sometimes you can simplify many things or do things that are 
not described in the documentation. Below is a list with the 
most useful:&]
[s6;l160;i150;O0; You can add resources to your pure Android SDK/NDK 
application by defining following package flag: `"ANDROID`_RESOURCES`_PACKAGE`". 
The package define in that way should be in line with directory 
structure described in [^http`:`/`/developer`.android`.com`/guide`/topics`/resources`/providing`-resources`.html^ h
ttp://developer.android.com/guide/topics/resources/providing`-resources.html].&]
[s6;l160;i150;O0; You can use download button to launch a web browser 
with the download site.&]
[s6;l160;i150;O0; You don`'t need to specific path manually `- use 
select directory button instead.&]
[s6;l160;i150;O0; On Debian/Ubuntu directories containing JDKs are 
located in `"/usr/lib/jvm/`".&]
[s6;l160;i150;O0; Use preprocess IDE option on Java files to generate 
C/C`+`+ stubs.&]
[s6;l160;i150;O0; You can launch Android SDK manager from TheIDE 
by selecting following option from TheIDE menu bar: [/ Setup `-> 
Android `-> SDK Manager].&]
[s6;l160;i150;O0; The second application you can start directly from 
TheIDE is AVD Manager. It is available from following TheIDE 
menubar entry: [/ Setup `-> Android `-> AVD Manager].&]
[s3; 8. Known issues&]
[s2; The android builder code is not fully complete. Sometimes there 
are also errors in the code. If you found something disturbing 
please let us know about it. You can do this by posting the topic 
on the official Ultimate`+`+ forum.&]
[s6;l160;i150;O0; Debugging doesn`'t work `- functionality is not 
implemented.&]
[s6;l160;i150;O0; Graphical interface for signing applications in 
release mode `- you need to do this manually using command line 
interface.&]
[s6;l160;i150;O0; Disk space consumption `- to achieve Android project 
compatibility we make copy of project files.&]
[s6;l160;i150;O0; Java sources compile in single thread.&]
[s3; 9. Appendix&]
[s2; In the near future we plan to port the whole Ultimate`+`+ library 
to Android.]]