我正在尝试使用Android SDK将AdMob sdk添加到我的Android项目中。 这是做了什么。
以下是build.gradle文件,显示为
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:13.0.+'
}
dependencies{
compile files('libs/android-support-v4.jar','libs/GoogleAdMobAdsSdk-6.4.1')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
}
以下是错误。
Gradle 'StoriesIndian' project refresh failed:
Could not fetch model of type 'IdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
Build file 'C:\Users\lokesh\Desktop\MyStoryProject\StoriesIndianProject\StoriesIndian\build.gradle' line: 11
A problem occurred evaluating project ':StoriesIndian'.
A problem occurred evaluating project ':StoriesIndian'.
No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection) values: [file collection]
Possible solutions: module(java.lang.Object
)
请帮助,如何使其工作以及在哪里包含模块java.lang.object。 感谢