【发布时间】:2014-08-08 11:56:52
【问题描述】:
根据设置 google play API - https://developer.android.com/google/play-services/setup.html,我正在使用 AndroidStudio 并尝试在我的应用上投放一些广告
Adter 我将项目与 Grandle 文件同步我收到此错误:
Error:Failed to find: com.google.android.gms:play-services:5.0.77
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile">Open File</a><br><a href="open.dependency.in.project.structure">Open in Project Structure dialog</a>
这是我的 gradle.build:
apply plugin: 'com.android.application'
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.pachu.fartsounds"
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19.+'
compile 'com.google.android.gms:play-services:5.0.77'
}
我的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pachu.fartsounds">
<application
android:allowBackup="true"
android:icon="@drawable/fart_icon"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".FartActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
有什么想法吗?谢谢!
【问题讨论】:
-
你能发布你的整个清单吗?
-
好的,您缺少清单的关键部分。我将在下面发布答案。
标签: android gradle android-studio google-play-services