renative icon indicating copy to clipboard operation
renative copied to clipboard

Could not find method testImplementation()

Open grkemtneri opened this issue 4 years ago β€’ 3 comments

Describe the bug when Δ± start my project, Δ± am getting Could not find method testImplementation(). I did look solution from stackoverflow . I changed 'I' To 'Δ°' but reverted back after building.

To Reproduce Steps to reproduce the behavior:

  1. Run command 'rnv run -p androidwear'
  2. See error
Build file 'C:\Users\Gorkem\Desktop\workspace\newapp\platformBuilds\blank_androidwear\app\build.gradle' line: 94

A problem occurred evaluating project ':app'.
> Could not find method testImplementation() for arguments [junit:junit:4.12] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

app\build.gradle

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    implementation 'org.webkit:android-jsc:+'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation ('com.facebook.react:react-native:+') {
 exclude group: 'com.android.support' 
 exclude group: 'javax.inject' 
 exclude group: 'com.squareup.okhttp3', module: 'okhttp' 
 exclude group: 'com.squareup.okio' 
 }
    implementation project(':react-native-gesture-handler')
    implementation project(':react-native-reanimated')
    implementation project(':react-native-vector-icons')
    implementation "androidx.appcompat:appcompat:1.1.0"
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02"
    debugImplementation files("C:/Users/Gorkem/Desktop/workspace/newapp/node_modules/hermes-engine/android/hermes-debug.aar")
    releaseImplementation files("C:/Users/Gorkem/Desktop/workspace/newapp/node_modules/hermes-engine/android/hermes-release.aar")

}

Desktop (please complete the following information):

  • OS: [e.g. osx, windows 7, ubuntu 16.04] Windows 10 TR
  • Node Version [e.g. v10.16.3] v14.15.0
  • RNV Version [e.g. 0.25.0] 0.31.3

grkemtneri avatar Nov 26 '20 09:11 grkemtneri

Hi GΓΆrkem, have you found a solution?

erguncaner avatar Jan 03 '21 20:01 erguncaner

@grkemtneri @erguncaner I'll into it. in the meantime you can always override core rnv files in this instance copy:

./node_modules/@rnv/engine-rn/templates/platforms/android/app/build.gradle

to your project:

./appConfigs/base/builds/android/app/build.gradle

this will allow you to manually update/customize build.gradle if you need to add a fix or change not available via rnv options

pavjacko avatar Jan 04 '21 07:01 pavjacko

I cant see ./node_modules/@rnv/engine-rn/templates in my project

grkemtneri avatar Jan 04 '21 08:01 grkemtneri

@grkemtneri thanks for reporting this issue, is this still reproduced on latest rnv version?

pauliusguzas avatar May 22 '23 08:05 pauliusguzas

Hi

  • What went wrong: A problem occurred evaluating root project 'uhm'.

Could not find method testImplementation() for arguments [org.junit.jupiter:junit-jupiter-api:5.6.2] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

facing similar issue . Is the solution found ?

sudheerrachuri avatar Nov 06 '23 06:11 sudheerrachuri

@grkemtneri I can't reproduce it on rnv 1.0.0-rc.10; node v18.19.0. Could you try it on this version?

GabrieleKaceviciute avatar Mar 15 '24 11:03 GabrieleKaceviciute

Closing as issue was resolved, feel free to reopen if needed

GabrieleKaceviciute avatar Mar 29 '24 12:03 GabrieleKaceviciute