Gradle DSL method not found: 'testimplementation()'
В проекте «Мой проект» может использоваться версия Gradle, которая не содержит метод. В файле сборки может отсутствовать подключаемый модуль Gradle. Применить плагин Gradle
я пробовал уже пробовал
Файл Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.techknocorp.a.metturcable"
minSdkVersion 14
targetSdkVersion 26
versionCode 532016
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testimplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
androidTestImplementation 'com.android.support.test:runner:1.1.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.1.1'
implementation files('libs/opencsv-2.3.jar')
}
Gradle верхнего уровня // Файл сборки верхнего уровня, в который можно добавить параметры конфигурации, общие для всех подпроектов/модулей.
buildscript {
repositories {
jcenter()
google()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Да, это полезно. Но запустите окно, показывающее только «выполненную задачу».
Не могли бы вы добавить больше деталей в свой вопрос?
Спасибо... вот в чем проблема
Используйте testImplementation
вместо testimplementation
.
dependencies {
//....
testImplementation 'junit:junit:4.12'
//..
}
Пожалуйста, попробуйте заменить
testimplementation
наtestImplementation