gpt4 book ai didi

java - Android Studio 中缺少存储库

转载 作者:行者123 更新时间:2023-11-29 00:03:44 25 4
gpt4 key购买 nike

我正在 android studio 中开展一个需要使用 google play 服务的项目。我知道我需要安装 SDK,但是如图所示,系统提示我提供一个链接来下载我必须使用的存储库。不幸的是,这个链接不起作用,我无法下载存储库,因此我的 gradle 不会同步。我该怎么办?

My code

最佳答案

我觉得您使用了错误的 API - 对于应用程序索引,您应该使用 Firebase App indexing .

因此,根据文档,您的 gradle 文件应该看起来像这样:

apply plugin: 'com.android.application'

android {
// ...
}

dependencies {
// ...
compile 'com.google.firebase:firebase-core:10.2.0'

// Getting a "Could not find" error? Make sure you have
// the latest Google Repository in the Android SDK manager
}

// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'

关于java - Android Studio 中缺少存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42541989/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com