我是安卓编码的新手,并试图将youtube API添加到我的应用程序中。但我一直在犯这个错误。我已经尝试了其他环节的解决方案,但我无法解决这个问题。有人能帮我吗?
我的应用程序->build.gradle看起来像这个
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.vidhya.youtubeplayer"
minSdkVersion 11
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
comple files('libs/YouTubeAndroidPlayerApi.jar')
}
我的渐变->build.gradle看起来像这样
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
} }
allprojects {
repositories {
jcenter()
}
}
我做错了什么?请帮忙。
更改
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
comple files('libs/YouTubeAndroidPlayerApi.jar')
}
至
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile files('libs/YouTubeAndroidPlayerApi.jar')
}