gpt4 book ai didi

android-studio - Android Studio 找不到我的 Google Play 服务

转载 作者:行者123 更新时间:2023-12-03 07:15:57 25 4
gpt4 key购买 nike

我已经遵循演练并浏览了一些问题几个小时,但我尝试过的所有方法都没有让我找到答案。接下来我该看哪里?

错误

Error:Could not find com.google.gms:google-services:1.3.0-beta1.
Searched in the following locations:
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.jar
https://maven.fabric.io/public/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom
https://maven.fabric.io/public/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.jar
Required by:
MyApp:myApp:unspecified

我的应用程序 Gradle

buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'

repositories {
maven { url 'https://maven.fabric.io/public' }
}


android {
compileSdkVersion 21
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "android.phone.MyApp"
minSdkVersion 13
targetSdkVersion 21
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
compile project(':comcrashlyticssdkandroid_crashlytics_2')
compile 'com.android.support:support-v4:+' // updated
compile 'com.google.android.gms:play-services-analytics:+' // updated
compile 'com.google.android.gms:play-services-gcm:+' // updated
compile "com.google.android.gms:play-services:+"
}

SDK 附加功能

enter image description here

最佳答案

jcenter() 包含 Android 库,您需要将其添加到您的存储库中。

buildscript {
repositories {
jcenter();
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'

repositories {
jcenter();
maven { url 'https://maven.fabric.io/public' }
}

关于android-studio - Android Studio 找不到我的 Google Play 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31818573/

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