官术网_书友最值得收藏!

Setting up Java

The Android platform technology stack is based on the Java technology; that is why the first item to be downloaded will be the Java Development Kit (JDK). Although Java JDK 8 is the latest version at the time of writing this book, it is not officially supported by all Android versions, so we will download JDK 6, all the template Java codes generated by Cocos2d-x can be successfully compiled with this version.

Note

Java Runtime Environment (JRE) is not enough for building the Android applications, since it only contains the files required for running the Java applications, but it does not contain the tools required for building the Java applications.

You can download the JDK 6 from Oracle at http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html regardless of your development environment.

If Windows is your current environment, then after installing JDK you are required to add the path of the binaries folder to the PATH environment variable. This path will look like this: C:\Program Files\Java\jdk1.6.0_45\bin.

Open a new system console and type javac –version, if Java compiler's version number is displayed, then you have successfully installed JDK in your system.

Note

JDK 7 is required for building the applications for Android 5.0 and higher. You should download this version if you are targeting the latest Android versions. But, if you want your game to be compatible with the Android versions that are older than 4.4, then you should pick JDK 6.

主站蜘蛛池模板: 景德镇市| 康保县| 基隆市| 右玉县| 华池县| 宁陕县| 崇左市| 宿迁市| 巴青县| 阜宁县| 大悟县| 黎平县| 康马县| 皋兰县| 晋城| 泗洪县| 正定县| 龙州县| 桃园县| 灌阳县| 洪湖市| 巩义市| 西平县| 饶阳县| 教育| 年辖:市辖区| 齐齐哈尔市| 长葛市| 凤台县| 白银市| 集贤县| 永靖县| 余江县| 普宁市| 丰台区| 鄂伦春自治旗| 那坡县| 卢氏县| 攀枝花市| 德保县| 潼南县|