我正在尝试将 Localytics 集成到我的 Android 项目中。他们的整合步骤包括:
Add a dependency to your project for the jar.
我怎么做?
我正在尝试将 Localytics 集成到我的 Android 项目中。他们的整合步骤包括:
Add a dependency to your project for the jar.
我怎么做?
使用 gradle :
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile name: 'gson-2.2.4'
}
PROJECT_NAME/app/libs/example.jar
将 .jar 文件添加到 gradle 文件中的依赖项。
dependencies {
compile files('libs/example.jar')
}
如果您使用的是 Android Studio,请切换到“项目”视图,找到要添加为依赖项的 Jar。右键单击罐子并选择“添加为库”。
PS:打开“项目”视图。使用菜单视图 > 工具窗口 > 项目
最后确保您在 app/build.gradle 中看到以下内容
依赖项{编译文件('libs/localytics.jar')}