@@ -16,7 +16,7 @@ buildscript {
1616 dependencies {
1717 classpath 'com.android.tools.build:gradle:2.2.3'
1818 //添加 android-gradle-plugin 依赖
19- classpath 'com.sensorsdata.analytics.android:android-gradle-plugin :1.0.6 '
19+ classpath 'com.sensorsdata.analytics.android:android-gradle-plugin2 :1.0.0 '
2020 }
2121}
2222
@@ -40,31 +40,15 @@ apply plugin: 'com.sensorsdata.analytics.android'
4040dependencies {
4141 compile 'com.android.support:appcompat-v7:25.1.1'
4242 //添加 Sensors Analytics SDK 依赖
43- compile 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK :1.7.1 '
43+ compile 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK2 :1.8.0 '
4444}
4545```
4646
4747如下示例图:
4848![ ] ( https://github.com/sensorsdata/sa-sdk-android-plugin/blob/master/screenshots/android_sdk_autotrack_2.png )
4949
5050* 注* :
51- 1、在 project 级别的 gradle.properties 中添加如下配置:
52-
53- ``` android
54- android.enableBuildCache=false
55- ```
56-
57- 如下示例图:
58- ![ ] ( https://github.com/sensorsdata/sa-sdk-android-plugin/blob/master/screenshots/android_sdk_autotrack_5.png )
59-
60- 如果开启 buildCache,Android Studio 会把依赖的 jar 或 arr 缓存到本地,并且把模块名称设置为 hash 值,导致 includeJarFilter 配置失效。
61-
62- 2、目前全埋点不支持 Android Studio 的 instant run 特性,使用全埋点需要关闭该特性。
63-
64- 如下示例图:
65- ![ ] ( https://github.com/sensorsdata/sa-sdk-android-plugin/blob/master/screenshots/android_sdk_autotrack_4.png )
66-
67- 3、由于 SDK 会依赖 appcompat-v7 处理下面几个控件:
51+ 1、由于 SDK 会依赖 appcompat-v7 处理下面几个控件:
6852
6953* android.support.v7.widget.SwitchCompat
7054* android.support.v7.app.AlertDialog
@@ -75,21 +59,32 @@ android.enableBuildCache=false
7559compile 'com.android.support:appcompat-v7:25.1.1'
7660```
7761
62+ ## 感谢
63+ [ hugo] ( https://github.com/JakeWharton/hugo )
64+ [ gradle_plugin_android_aspectjx] ( https://github.com/HujiangTechnology/gradle_plugin_android_aspectjx )
65+ [ gradle-android-aspectj-plugin] ( https://github.com/uPhyca/gradle-android-aspectj-plugin )
66+ [ tracklytics] ( https://github.com/orhanobut/tracklytics )
67+
7868## To Learn More
7969
8070See our [ full manual] ( http://www.sensorsdata.cn/manual/android_sdk.html )
8171
8272## License
8373
84-
85- Copyright 2016 firefly1126, Inc.
74+ Copyright 2015-2017 Sensors Data Inc.
8675
8776Licensed under the Apache License, Version 2.0 (the "License");
8877you may not use this file except in compliance with the License.
8978You may obtain a copy of the License at
9079
9180http://www.apache.org/licenses/LICENSE-2.0
9281
82+ Unless required by applicable law or agreed to in writing, software
83+ distributed under the License is distributed on an "AS IS" BASIS,
84+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
85+ See the License for the specific language governing permissions and
86+ limitations under the License.
87+
9388Unless required by applicable law or agreed to in writing, software
9489distributed under the License is distributed on an "AS IS" BASIS,
9590WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0 commit comments