mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 462 forks source link

Failed to resolve: android.test.runner:1.1.1 #103

Closed wheel1992 closed 5 years ago

wheel1992 commented 5 years ago

Below is the output after trying to build gradle.

ERROR: Unable to resolve dependency for ':app@developmentDynamicProfile/compileClasspath': Could not resolve project :barcode_scan.

Underandroid/build.gradle

...
dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
}
...

Under android/app/build.gradle

...
dependencies {
    ...
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.21"
    ...
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.runner:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
...
hehuapei commented 5 years ago

My program works fine! Under android/build.gradle

classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20'

Under android/app/build.gradle

estImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version'
wheel1992 commented 5 years ago

Yours will work because it is not AndroidX

lColinDl commented 5 years ago

The problem is that you replaced a : with a . Use androidTestImplementation 'androidx.test:runner:1.1.1' instead.

wheel1992 commented 5 years ago

@lColinDl thank you!

calistus commented 4 years ago

The problem is that you replaced a : with a . Use androidTestImplementation 'androidx.test:runner:1.1.1' instead.

This works for me

AnhDTN commented 4 years ago

ERROR: Failed to resolve: com.androidx.support.test.espresso:espresso-core:3.0.2 :( please help me

calistus commented 4 years ago

ERROR: Failed to resolve: com.androidx.support.test.espresso:espresso-core:3.0.2 :( please help me

Go to the app level build.gradle of your Android directory and add the espresso dependency like this androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

AnhDTN commented 4 years ago

ERROR: Failed to resolve: com.androidx.support.test.espresso:espresso-core:3.0.2 :( please help me

Go to the app level build.gradle of your Android directory and add the espresso dependency like this androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

Thank you <3