2日後にアンドロイドスタジオを実行しようとしましたが、最後にエラー400と、build.gradle
ファイルこのエラー:(40、0)引数[ディレクトリ 'libs']のメソッド実装()を見つけることができません
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}
allprojects {
repositories {
jcenter()
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.1'
defaultConfig {
applicationId "com.armenhovhannisyan.backpaper.backpaper"
minSdkVersion 25
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso- core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.0-beta1'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:design:25.0.0-beta1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-annotations:25.3.1'
}
私gradle.propertiesにいくつかの変更は、それがこの
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decou pled_projects
# org.gradle.parallel=true
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1- all.zip
なぜ 'comp'の代わりに' implementation'をやっていますか? https://developer.android.com/studio/build/dependencies.htmlを参照してください。編集:私はちょうどいくつかの記事を読んで、appiledly 'compile'はgrable 3.0になっています。 – nbokmans
アンドロイド・グラデル2.XXで 'implementation'を使用することはできません。アンドロイド・グラデル・プラグイン3.0.0(現在はアルファ)以上が必要です – MatPag