I have coded an test class in my app and it is written correctly because I checked it by ChatGPT. but when I run it I get the error: Could not find androidx.test.runner:1.4.0:. I have this line in my dependencies though. I have checked newer versions of the runner but I get the same error.
Here are my dependencies:
implementation 'androidx.core:core-ktx:1.9.0'
androidTestImplementation 'androidx.test:rules:1.5.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation platform('com.google.firebase:firebase-bom:31.2.3')
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
androidTestImplementation 'androidx.test.runner:1.4.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
implementation 'androidx.test.ext:junit-ktx:1.1.5'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.google.firebase:firebase-database-ktx'
I asked ChatGPT but he dosen't know the cause.