1

I started learning Android Studio. I created my first project but I met with the following errors;

1) could not find method test mplementation() for arguments [junit:junit:4.13] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.defaultdependencyhandler.

2) * What went wrong: A problem occurred configuring project ':app'.

Could not create task ':app:Main.main()'. SourceSet with name 'main' not found.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.6.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s 12:55:07 PM: Task execution finished 'Main.main()'.

I applied the following for the solution.But problem did not solved ;

1) My computer language is English.

2) I deleted the gradle folder and reloaded it.

3) build.gradle(module.app) in replaced with I,İ

4) androidTestImplementation 'androidx.test.ext:junit:1.1.1 added.(build.gradle(module.app))

The build.gradle of the app module:

apply plugin: 'com.android.application'
android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"
    defaultConfig {
        applicationId "com.example.deneme" 
        minSdkVersion 28
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies { 
    implementation fileTree(dir: 'libs', include: ['*.jar']) 
    implementation 'androidx.appcompat:appcompat:1.1.0' 
    testImplementation 'junit:junit:4.13' 
    androidTestImplementation 'androidx.test.ext:junit:1.1.1' 
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
jeprubio
  • 17,312
  • 5
  • 45
  • 56
Seda Yılmaz
  • 31
  • 1
  • 8

0 Answers0