2015-01-15 08:59:03 +08:00
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE - RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
2016-09-06 17:01:23 +08:00
- [Cocos2d-x 3.13.1 Release Notes ](#cocos2d-x-3131-release-notes )
2015-01-15 08:59:03 +08:00
- [Misc Information ](#misc-information )
2016-09-06 17:01:23 +08:00
- [v3.13.1 ](#v3131 )
- [Bug fixed ](#bug-fixed )
2016-09-08 18:36:25 +08:00
- [Cocos command modification ](#cocos-command-modification )
2015-01-15 08:59:03 +08:00
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2016-09-06 17:01:23 +08:00
# Cocos2d-x 3.13.1 Release Notes #
2015-07-01 18:44:15 +08:00
2014-01-07 08:23:06 +08:00
# Misc Information
2015-03-13 17:18:29 +08:00
* [Full Changelog ](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG )
2014-01-07 08:23:06 +08:00
2016-09-06 17:01:23 +08:00
# v3.13.1
2015-04-22 14:59:22 +08:00
2016-09-06 17:01:23 +08:00
## Bug fixed
2015-08-24 09:40:59 +08:00
2016-09-07 13:58:48 +08:00
* Label color broken
* application will crash in debug mode if don't specify a design resolution
* may crash if coming from background by clicking application icon on Android
* AudioEngine can not play audio if the audio lies outside APK on Android
* AudioEngine::stop() will trigger `finish` callback on Android
2016-09-08 18:36:25 +08:00
* application will crash if using SimpleAudioEngine or new AudioEngine to play audio on Android 2.3.x
* object.setString() has not effect if passing a number on JSB
2016-09-13 16:13:31 +08:00
## Cocos command modifications
2016-09-08 18:36:25 +08:00
2016-09-13 16:13:31 +08:00
Prior to `v3.13` the __cocos__ command would find an Android API level __ >=__ a specified
Android API level inorder to build source codes on Android. For example, if the contents of
__APP_ROOT/proj.android/project.properties__ is:
2016-09-08 18:36:25 +08:00
```
target=android-13 // the default android api level
android.library.reference.1=../../../cocos/platform/android/java
```
2016-09-13 16:13:31 +08:00
then the __cocos__ command will find __android-13__ in `ANDROID_SDK_ROOT/platforms` . If __android-13__
is not found then it will try to find __android-14__ . If __android-14__ is not found, then it will find
__android-15__ and so on until it finds one.
2016-09-08 18:36:25 +08:00
2016-09-13 16:13:31 +08:00
This algorithm has a problem. If you only download __Android 21__ , then your application will be built with
__Android 21__ even though the default API level is 13. If your application runs on a device with a lower Android OS,
such as Android 4.0, then your application may crash. Building with a higher API level does not ensure that your
application will run on devices with a lower Android OS.
2016-09-08 18:36:25 +08:00
2016-09-13 16:13:31 +08:00
Starting in `v3.13.1` , the __cocos__ command will stop if it can not find a specific API level. The default
is __android-13__ . If you want to build with a higher level Android SDK, you should explicitely specify it.
Example:
```sh
2016-09-08 18:36:25 +08:00
cocos compile -p android --ap android-19
```
2016-09-13 16:13:31 +08:00
Keep in mind that, after running this command, the contents of `APP_ROOT/proj.android/project.properties` will
be changed, __android-19__ will now be the default API level.
2016-09-08 18:36:25 +08:00
2016-09-13 16:13:31 +08:00
There is a map between Android API level and Android OS version that you can [refer to ](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html ) for detailed information.
2016-09-07 13:58:48 +08:00
2016-09-13 16:13:31 +08:00
There is also more detailed information in our [GitHub repo ](https://github.com/cocos2d/cocos2d-x/milestone/33 ) about this issue.