简体   繁体   English

如何在Android项目中添加SDK模块

[英]How to add SDK module in Android project

I am trying to implement a payment processor in my Android app that works in the Middle East, which is an SDK module, but not having much success.我正在尝试在我的 Android 应用程序中实现支付处理器,该应用程序在中东工作,这是一个 SDK 模块,但没有取得多大成功。 Their customer support has not been helpful so far.到目前为止,他们的客户支持没有帮助。

These are the steps they provide.这些是他们提供的步骤。 However in step 1, I'm not sure where to clone it, in the libs dir?但是在第 1 步中,我不确定在 libs 目录中克隆它的位置? Then in step 2 it's not clear what to make of this?然后在第 2 步中不清楚该怎么做? Should I write include:library', ':app' - or perhaps include ':goSellSDK-Android', ':app' .我应该写include:library', ':app' - 还是include ':goSellSDK-Android', ':app' In step 3, their Module simply does not show up in the list, no matter what I try for step 2.在第 3 步中,他们的模块根本不会出现在列表中,无论我在第 2 步中尝试什么。

If I try to add the module through 'import module from source' it adds the sample, not the library.如果我尝试通过“从源导入模块”添加模块,它会添加示例,而不是库。 I feel I am missing something, any help is appreciated.我觉得我错过了一些东西,任何帮助表示赞赏。

step 1 - Clone goSellSDK library from Tap repository git@github.com:Tap-Payments/goSellSDK-Android.git第 1 步 - 从 Tap 存储库 git@github.com:Tap-Payments/goSellSDK-Android.git 克隆 goSellSDK 库

step 2 - Add goSellSDK library to your project settings.gradle file as following include ':library', ':YourAppName'第 2 步 - 将 goSellSDK 库添加到您的项目 settings.gradle 文件中,包括 ':library', ':YourAppName'

step 3 - Setup your project to include goSellSDK as a dependency Module.第 3 步 - 设置您的项目以包含 goSellSDK 作为依赖模块。

  • File -> Project Structure -> Modules -> << your project name >>文件 -> 项目结构 -> 模块 -> <<你的项目名称>>
  • Dependencies -> click on + icon in the screen bottom -> add Module依赖项 -> 点击屏幕底部的 + 图标 -> 添加模块
  • Dependency select goSellSDK library依赖 select goSellSDK 库

Try to follow the installation guide using jitpack尝试使用 jitpack 遵循安装指南

  1. Add JitPack in your root build.gradle at the end of repositories:在存储库末尾的根build.gradle中添加 JitPack:

     allprojects { repositories {... maven { url 'https://jitpack.io' } } }
  2. Add dependency to your module's build.gradle file (propably your app module)将依赖项添加到模块的build.gradle文件(可能是您的应用程序模块)

     dependencies { implementation 'com.github.Tap-Payments:goSellSDK-Android:2.12.1' }

Let me know how it goes让我知道事情的后续

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM