android - 找不到 com.snapchat.kit.sdk :core:1. 6.5

标签 android snapchat

尝试集成 Snapchat 登录 SDK。我已按照此处的说明进行操作:

https://docs.snapchat.com/docs/login-kit-android

所以我添加了 Maven 存储库:

repositories {
   maven {
       url "https://storage.googleapis.com/snap-kit-build/maven"
   }
}

添加了这些依赖项:

dependencies {
   ...
   implementation([
           'com.snapchat.kit.sdk:login:1.6.5',
           'com.snapchat.kit.sdk:core:1.6.5'
   ])
}

并添加此内容以过滤掉 transient x86 库:

defaultConfig {
  ndk {
    abiFilters 'armeabi-v7a', 'arm64-v8a'
  }
}

Gradle 同步正常,我可以在代码中访问 SDK 组件。但是,当我尝试构建应用程序时,我收到以下错误消息:

Could not find com.snapchat.kit.sdk:core:1.6.5.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/com/snapchat/kit/sdk/core/1.6.5/core-1.6.5.pom
  - https://jcenter.bintray.com/com/snapchat/kit/sdk/core/1.6.5/core-1.6.5.pom
  - https://repo.maven.apache.org/maven2/com/snapchat/kit/sdk/core/1.6.5/core-1.6.5.pom
  - https://jitpack.io/com/snapchat/kit/sdk/core/1.6.5/core-1.6.5.pom
  - https://repo.adobe.com/nexus/content/repositories/releases/com/snapchat/kit/sdk/core/1.6.5/core-1.6.5.pom
  - https://maven.localytics.com/public/com/snapchat/kit/sdk/core/1.6.5/core-1.6.5.pom
Required by:
    project :<my project details>

现在,根据官方文档,它说:

Note: If you have trouble accessing Google (used in the link above), you can use our GitHub Maven repository with the following code block:

repositories {
   maven {
       url "https://raw.githubusercontent.com/Snap-Kit/release-maven/repo"
   }
}

即使用不同的存储库。所以我尝试了这个,但错误仍然存​​在。

顶部提到的另一点令人困惑的文档是:

To connect your app to Snapchat, your app must also have the following targets:

    Android support library version 22+
    Snapchat 10.34.0.0+

我们确实“定位”版本 22+ 的支持库,但不知道“目标 Snapchat 10.34.0.0+”意味着什么,因为我找不到 Snapchat 的任何库/依赖项/SDK。

有人可以帮忙吗?

最佳答案

@jjnunog 的评论指出了正确的方向。我遇到了同样的问题,并通过将存储库条目添加到以下位置来修复它:

allprojects {
    repositories {
        ...
        maven {
            url "https://storage.googleapis.com/snap-kit-build/maven"
        }
    }
}

而不是创建一个新的顶级条目。

关于android - 找不到 com.snapchat.kit.sdk :core:1. 6.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63917600/

相关文章:

oauth-2.0 - Snapchat 登录工具包错误 : Missing PKCE parameters

ios - Swift 中的 Snapchat API

java - NfcAdapter.getDefaultAdapter 返回 null

Android - 如何在 Robospice/retrofit 中获取 JSON 格式的请求和响应

android - 一加一的 CM12 构建失败

ios - 来自 GitHub 的 SwipeNavigationController 框架如何实现

Android:更新到 SDK 23 后的 java.land.NoSuchFieldError

android - 如何在android中创建六边形 ListView

ios - 像 facebook 和 twitter 一样分享到 snapchat?