Skip to content

Commit

Permalink
update android sample version
Browse files Browse the repository at this point in the history
  • Loading branch information
jehoochen committed Jul 17, 2017
1 parent cb2ba4b commit 5ab4455
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Mars

[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/Tencent/mars/blob/master/LICENSE)
[![Release Version](https://img.shields.io/badge/release-1.1.4-red.svg)](https://github.com/Tencent/mars/releases)
[![Release Version](https://img.shields.io/badge/release-1.1.9-red.svg)](https://github.com/Tencent/mars/releases)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/mars/pulls)
[![WeChat Approved](https://img.shields.io/badge/Wechat_Approved-1.1.4-red.svg)](https://github.com/Tencent/mars/wiki)
[![WeChat Approved](https://img.shields.io/badge/Platform-%20iOS%20%7C%20OS%20X%20%7C%20Android%20-brightgreen.svg)](https://github.com/Tencent/mars/wiki)
[![WeChat Approved](https://img.shields.io/badge/Wechat_Approved-1.1.9-red.svg)](https://github.com/Tencent/mars/wiki)
[![WeChat Approved](https://img.shields.io/badge/Platform-%20iOS%20%7C%20OS%20X%20%7C%20Android(ndk11c)%20-brightgreen.svg)](https://github.com/Tencent/mars/wiki)

(中文版本请参看[这里](#mars_cn))

Expand Down Expand Up @@ -41,7 +41,7 @@ Add dependencies by adding the following lines to your app/build.gradle.

```xml
dependencies {
compile 'com.tencent.mars:mars-wrapper:1.1.4'
compile 'com.tencent.mars:mars-wrapper:1.1.7'
}
```

Expand All @@ -53,7 +53,7 @@ Add dependencies by adding the following lines to your app/build.gradle.

```xml
dependencies {
compile 'com.tencent.mars:mars-core:1.1.4'
compile 'com.tencent.mars:mars-core:1.2.0'
}
```

Expand All @@ -72,13 +72,16 @@ System.loadLibrary("marsxlog");
final String SDCARD = Environment.getExternalStorageDirectory().getAbsolutePath();
final String logPath = SDCARD + "/marssample/log";

// this is necessary, or may cash for SIGBUS
final String cachePath = this.getFilesDir() + "/xlog"

//init xlog
if (BuildConfig.DEBUG) {
Xlog.appenderOpen(Xlog.LEVEL_DEBUG, Xlog.AppednerModeAsync, "", logPath, "MarsSample");
Xlog.appenderOpen(Xlog.LEVEL_DEBUG, Xlog.AppednerModeAsync, cachePath, logPath, "MarsSample", "");
Xlog.setConsoleLogOpen(true);

} else {
Xlog.appenderOpen(Xlog.LEVEL_INFO, Xlog.AppednerModeAsync, "", logPath, "MarsSample");
Xlog.appenderOpen(Xlog.LEVEL_INFO, Xlog.AppednerModeAsync, cachePath, logPath, "MarsSample", "");
Xlog.setConsoleLogOpen(false);
}

Expand Down Expand Up @@ -184,7 +187,7 @@ appender_set_console_log(true);
xlogger_SetLevel(kLevelInfo);
appender_set_console_log(false);
#endif
appender_open(kAppednerAsync, [logPath UTF8String], "Test");
appender_open(kAppednerAsync, [logPath UTF8String], "Test", "");
```
Uninitialized xlog in function "applicationWillTerminate"
Expand Down Expand Up @@ -377,9 +380,9 @@ Mars is under the MIT license. See the [LICENSE](https://github.com/Tencent/mars
## <a name="mars_cn">Mars</a>

[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/Tencent/mars/blob/master/LICENSE)
[![Release Version](https://img.shields.io/badge/release-1.1.4-red.svg)](https://github.com/Tencent/mars/releases)
[![Release Version](https://img.shields.io/badge/release-1.1.9-red.svg)](https://github.com/Tencent/mars/releases)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/mars/pulls)
[![WeChat Approved](https://img.shields.io/badge/Wechat_Approved-1.1.4-red.svg)](https://github.com/Tencent/mars/wiki)
[![WeChat Approved](https://img.shields.io/badge/Wechat_Approved-1.1.9-red.svg)](https://github.com/Tencent/mars/wiki)
[![WeChat Approved](https://img.shields.io/badge/Platform-%20iOS%20%7C%20OS%20X%20%7C%20Android%20-brightgreen.svg)](https://github.com/Tencent/mars/wiki)

Mars 是微信官方的跨平台跨业务的终端基础组件。
Expand Down Expand Up @@ -411,7 +414,7 @@ gradle 接入我们提供了两种接入方式:[mars-wrapper](#wrapper) 或者

```xml
dependencies {
compile 'com.tencent.mars:mars-wrapper:1.1.4'
compile 'com.tencent.mars:mars-wrapper:1.1.7'
}
```

Expand All @@ -424,7 +427,7 @@ dependencies {

```xml
dependencies {
compile 'com.tencent.mars:mars-core:1.1.4'
compile 'com.tencent.mars:mars-core:1.2.0, '
}
```
接着往下操作之前,请先确保你已经添加了 mars-wrapper 或者 mars-core 的依赖
Expand All @@ -441,13 +444,16 @@ System.loadLibrary("marsxlog");
final String SDCARD = Environment.getExternalStorageDirectory().getAbsolutePath();
final String logPath = SDCARD + "/marssample/log";

// this is necessary, or may cash for SIGBUS
final String cachePath = this.getFilesDir() + "/xlog"

//init xlog
if (BuildConfig.DEBUG) {
Xlog.appenderOpen(Xlog.LEVEL_DEBUG, Xlog.AppednerModeAsync, "", logPath, "MarsSample");
Xlog.appenderOpen(Xlog.LEVEL_DEBUG, Xlog.AppednerModeAsync, cachePath, logPath, "MarsSample", "");
Xlog.setConsoleLogOpen(true);

} else {
Xlog.appenderOpen(Xlog.LEVEL_INFO, Xlog.AppednerModeAsync, "", logPath, "MarsSample");
Xlog.appenderOpen(Xlog.LEVEL_INFO, Xlog.AppednerModeAsync, cachePath, logPath, "MarsSample", "");
Xlog.setConsoleLogOpen(false);
}

Expand Down Expand Up @@ -555,7 +561,7 @@ appender_set_console_log(true);
xlogger_SetLevel(kLevelInfo);
appender_set_console_log(false);
#endif
appender_open(kAppednerAsync, [logPath UTF8String], "Test");
appender_open(kAppednerAsync, [logPath UTF8String], "Test", "");
```
在函数 "applicationWillTerminate" 中反初始化 Xlog
Expand Down
2 changes: 1 addition & 1 deletion mars/libraries/mars_android_sdk/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROJ_VERSION=1.2.0
### 最后 gradle引用的形式就是 $PROJ_GROUP:$PROJ_ARTIFACTID:$PROJ_VERSION

# 库名
PROJ_NAME=Mars-Core
PROJ_NAME=mars-core
# 库的项目主页
PROJ_WEBSITEURL=https://github.com/Tencent/mars
# 问题跟踪地址
Expand Down
2 changes: 1 addition & 1 deletion mars/libraries/mars_xlog_sdk/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROJ_VERSION=1.0.5
### 最后 gradle引用的形式就是 $PROJ_GROUP:$PROJ_ARTIFACTID:$PROJ_VERSION

# 库名
PROJ_NAME=Mars-Xlog
PROJ_NAME=mars-xlog
# 库的项目主页
PROJ_WEBSITEURL=https://github.com/Tencent/mars
# 问题跟踪地址
Expand Down
4 changes: 2 additions & 2 deletions samples/android/marsSampleChat/wrapper/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ PROJ_GROUP=com.tencent.mars
# 库的ID
PROJ_ARTIFACTID=mars-wrapper
# 库的版本
PROJ_VERSION=1.1.4
PROJ_VERSION=1.1.7
### 最后 gradle引用的形式就是 $PROJ_GROUP:$PROJ_ARTIFACTID:$PROJ_VERSION

# 库名
PROJ_NAME=Mars-Wrapper
PROJ_NAME=mars-wrapper
# 库的项目主页
PROJ_WEBSITEURL=https://github.com/Tencent/mars
# 问题跟踪地址
Expand Down

0 comments on commit 5ab4455

Please sign in to comment.