Android studio 安卓工作室可以';找不到我的Google Play服务
几个小时来,我一直在关注演练和sof问题,但我尝试过的任何事情都没有让我找到答案。下一步我该去哪里 错误 MyApp Gradle SDK附加服务Android studio 安卓工作室可以';找不到我的Google Play服务,android-studio,google-play-services,Android Studio,Google Play Services,几个小时来,我一直在关注演练和sof问题,但我尝试过的任何事情都没有让我找到答案。下一步我该去哪里 错误 MyApp Gradle SDK附加服务 jcenter()包含Android库,您需要将其添加到存储库中 buildscript { repositories { jcenter(); maven { url 'https://maven.fabric.io/public' } } dependencies { cl
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' }
}
指定版本会改变什么吗?比如
编译'com.google.android.gms:play services:7.5.0'
。另外,如果你已经包含了基本库,那么你不需要选择性地编译分析和gcm。我认为所有这些都很好。问题似乎是编译器找不到googleservices:1.3.0-beta1
噢,我是盲人,我甚至没有注意到你的错误。我想你需要在你的职责中包括jcenter()
。@Andy你能给我一些东西给google吗?“jcenter android studio”带来了很多杂乱无章的东西需要整理,我不知道它是否有价值。jcenter()
是包含android库的存储库,比如com.google.gms:google services:1.3.0-beta1
,但找不到。我在build.gradle中看到的只是maven{url'https://maven.fabric.io/public“}
哪一个仅适用于Fabric SDK?下面包含一个可能有助于澄清的示例。
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:+"
}
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' }
}
//Add the dependency to your project's top-level build.gradle:
classpath 'com.google.gms:google-services:1.3.0-beta1'
//Add the plugin to your app-level build.gradle:
apply plugin: 'com.google.gms.google-services'
//Set Up Google Play Services
dependencies {
compile "com.google.android.gms:play-services:7.5.+"
}