【仅供内部供应商使用,不提供对外解答和培训】

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagegroovy
title添加该模块依赖包添加模块依赖
linenumberstrue
compile 'com.fr.android:report-sdk:+'      // 添加SDK report模块依赖
compile 'com.fr.android:bi-sdk:+'          // 添加SDK bi模块依赖
//compile 'com.fr.android:core:+'            // 添加SDK 核心模块依赖
//compile 'com.fr.android:platform:+'      fileTree(include: ['*.jar'], dir: 'libs')  // 添加SDK 核心模块依赖
//compile 'com.fr.android:gis:+'             // 添加SDK 地图模块依赖
//compile 'com.fr.android:location:+'        // 添加SDK 定位模块依赖
//compile 'com.fr.android:vpn:+'             // 添加SDK vpn模块依赖
//compile 'com.fr.android:push-xg:+'         // 添加SDK 推送模块依赖

...

4. 在该模块清单文件的application标签中添加属性

Code Block
languagexml
title添加该模块依赖包
linenumberstrue
tools:replace="android:allowBackup, android:label, android:icon, android:theme"   // 替换SDK清单文件中allowBackup, label, icon, theme等属性的值

5. 项目本身需要做的工程引用. 其中core. platform为核心模块,  bi report为顶层模块.  vpn location xg push为可选模块.

Code Block
languagegroovy
title添加该模块依赖包
linenumberstrue
依赖部分jar包文件
 
compile 'com.google.zxing:core:3.1.0'// 内部使用
compile 'com.jiechic.library:xUtils:2.6.14'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.4.0'

compile fileTree(include: ['*.jar'], dir: 'libs')

compile ('com.fr.android:report-sdk:+', {// 添加SDK 报表功能对应模块.report模块依赖
    transitive = false
})
compile ('com.fr.android:bi-sdk:+', {// BI功能对应模块.添加SDK bi模块依赖
    transitive = false
})
compile ('com.fr.android:platform:+', { // 核心功能添加SDK 框架核心模块依赖
    transitive = false
})
compile ('com.fr.android:core:+', { // 核心模块.添加SDK 核心模块依赖
    transitive = false  // 去除对应lib内部引用
})

compile ('com.fr.android:gis:+', {// 可选插件 Gis地图功能.地图模块依赖
    transitive = false
})
compile ('com.fr.android:location:+', {// 可选插件 定位功能.定位模块依赖
    transitive = false
})
compile ('com.fr.android:vpn:+', {// 可选插件 vpn功能.vpn模块依赖
    transitive = false
})
compile ('com.fr.android:push-xg:+', {// 可选插件 信鸽推送功能.信鸽推送模块依赖
    transitive = false
})

添加后,build.gradle如下所示

4. 在该模块清单文件的application标签中添加属性

Code Block
languagexml
title可能的标签冲突
linenumberstrue
tools:replace="android:allowBackup, android:label, android:icon, android:theme"   // 替换SDK清单文件中allowBackup, label, icon, theme等属性的值



如上,工程配置完毕,FR SDK已经成功添加到您的项目中,之后可以直接引用FR相关的API,进行集成开发。您也可以参考OEM_demo和SDK_demo中的项目结构和build.gradle文件,进行工程配置。