gpt4 book ai didi

android - 找不到Gradle DSL方法:complete()

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

我是Android编码的新手,并试图将youtube API添加到我的APP中。但是我一直遇到这个错误。我已经尝试了其他链接的解决方案,但无法解决问题。有人可以帮我吗?

我的app-> 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')
}

我的gradle-> 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')
}

关于android - 找不到Gradle DSL方法:complete(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33800184/

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