Flutter_file_picker: Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0-beta01'

Created on 5 Aug 2019  路  23Comments  路  Source: miguelpruivo/flutter_file_picker

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:lintVitalRelease'.

    Could not resolve all artifacts for configuration ':app:debugAndroidTestRuntimeClasspath'.
    Could not resolve androidx.appcompat:appcompat:1.0.0-beta01.
    Required by:
    project :app
    Cannot find a version of 'androidx.appcompat:appcompat' that satisfies the version constraints:
    Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0-beta01'
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Dependency path 'android:app:unspecified' --> 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02' --> 'com.google.android.material:material:1.0.0' --> 'androidx.appcompat:appcompat:1.0.0'

    Could not resolve androidx.vectordrawable:vectordrawable:1.0.0-beta01.
    Required by:
    project :app
    Cannot find a version of 'androidx.vectordrawable:vectordrawable' that satisfies the version constraints:
    Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable:1.0.0'
    Dependency path 'android:app:unspecified' --> 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02' --> 'com.google.android.material:material:1.0.0' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable:1.0.0'
    Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable-animated:1.0.0' --> 'androidx.vectordrawable:vectordrawable:1.0.0'
    Constraint path 'android:app:unspecified' --> 'androidx.vectordrawable:vectordrawable' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.vectordrawable:vectordrawable' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01

    Could not resolve androidx.vectordrawable:vectordrawable-animated:1.0.0-beta01.
    Required by:
    project :app
    Cannot find a version of 'androidx.vectordrawable:vectordrawable-animated' that satisfies the version constraints:
    Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
    Dependency path 'android:app:unspecified' --> 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02' --> 'com.google.android.material:material:1.0.0' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
    Constraint path 'android:app:unspecified' --> 'androidx.vectordrawable:vectordrawable-animated' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.vectordrawable:vectordrawable-animated' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01

    Could not resolve androidx.appcompat:appcompat:1.0.0-beta01.
    Required by:
    project :app > project :file_picker
    Cannot find a version of 'androidx.appcompat:appcompat' that satisfies the version constraints:
    Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0-beta01'
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Dependency path 'android:app:unspecified' --> 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02' --> 'com.google.android.material:material:1.0.0' --> 'androidx.appcompat:appcompat:1.0.0'

    Could not resolve androidx.appcompat:appcompat:1.0.0.
    Required by:
    project :app > androidx.test.espresso:espresso-contrib:3.2.0-alpha02 > com.google.android.material:material:1.0.0
    Cannot find a version of 'androidx.appcompat:appcompat' that satisfies the version constraints:
    Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0-beta01'
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.appcompat:appcompat' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Dependency path 'android:app:unspecified' --> 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02' --> 'com.google.android.material:material:1.0.0' --> 'androidx.appcompat:appcompat:1.0.0'

    Could not resolve androidx.vectordrawable:vectordrawable:1.0.0.
    Required by:
    project :app > androidx.appcompat:appcompat:1.0.0
    project :app > androidx.vectordrawable:vectordrawable-animated:1.0.0
    Cannot find a version of 'androidx.vectordrawable:vectordrawable' that satisfies the version constraints:
    Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable:1.0.0'
    Dependency path 'android:app:unspecified' --> 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02' --> 'com.google.android.material:material:1.0.0' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable:1.0.0'
    Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable-animated:1.0.0' --> 'androidx.vectordrawable:vectordrawable:1.0.0'
    Constraint path 'android:app:unspecified' --> 'androidx.vectordrawable:vectordrawable' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.vectordrawable:vectordrawable' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01

    Could not resolve androidx.vectordrawable:vectordrawable-animated:1.0.0.
    Required by:
    project :app > androidx.appcompat:appcompat:1.0.0
    Cannot find a version of 'androidx.vectordrawable:vectordrawable-animated' that satisfies the version constraints:
    Dependency path 'android:app:unspecified' --> 'com.mr.flutter.plugin.filepicker:file_picker:1.0-SNAPSHOT' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
    Dependency path 'android:app:unspecified' --> 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02' --> 'com.google.android.material:material:1.0.0' --> 'androidx.appcompat:appcompat:1.0.0' --> 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
    Constraint path 'android:app:unspecified' --> 'androidx.vectordrawable:vectordrawable-animated' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01
    Constraint path 'android:app:unspecified' --> 'androidx.vectordrawable:vectordrawable-animated' strictly '1.0.0-beta01' because of the following reason: debugRuntimeClasspath uses version 1.0.0-beta01

  • 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

BUILD FAILED in 1s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 1.8s


The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.


Gradle task assembleRelease failed with exit code 1

Most helpful comment

@Zeeshan0201 replace those two

androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02'

with one line only of

androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'

Also, I don't get why you have a flutter dependency there.

Make sure you flutter clean before building again, after these changes.

All 23 comments

@miguelpruivo can you please check this? getting build error due to some of incompatibilities with file_picker..

Looks like you don鈥檛 have Android X compatibility in your app. See here

@miguelpruivo my app is compatible with Android X, I already checked that docs..

What鈥檚 the minimum and target version of your Android app?

edit: also @Zeeshan, by the log looks like the dependencies can't be fetched either due to a connection problem or version resolution conflict.

@miguelpruivo minSdkVersion 16, targetSdkVersion 28

@miguelpruivo i am able to run and build debug app, only logs error came when i was trying to release build.

@Zeeshan0201 that's odd. What's the copile version in the build.gradle as well?

@miguelpruivo compileSdkVersion 28

Screenshot from 2019-08-05 15-51-46

and @miguelpruivo thanks for your quick response..

@Zeeshan0201 not that build.gradle, the one in your app folder. 馃憤

@miguelpruivo yes i edited it :smile: compileSdkVersion 28

Mind to flutter clean and flutter build apk --release again? That's somehow weird.

@miguelpruivo it's taking time for build,will inform once it's complete.

Screenshot from 2019-08-05 16-00-49
still coming :confused:

Can you please show me your android/app/build.gradle? You are showing the android/build.gradle.

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28

lintOptions {
    disable 'InvalidPackage'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.thundermobile"
    minSdkVersion 16
    targetSdkVersion 28
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}

buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.debug
        minifyEnabled true
        useProguard true
        // shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    }
}

}

flutter {
source '../..'
}

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02'
implementation 'com.google.firebase:firebase-firestore:18.0.0'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.6'

}

apply plugin: 'com.google.gms.google-services'

@miguelpruivo please check :arrow_up:

@Zeeshan0201 replace those two

androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0-alpha02'

with one line only of

androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'

Also, I don't get why you have a flutter dependency there.

Make sure you flutter clean before building again, after these changes.

@miguelpruivo okay,checking

This is taking an unexpectedly long time. @miguelpruivo

and yeah it's done without error :small_airplane:

but slightly it's size increases, by the way thanks a lot ! :pray: @miguelpruivo

@Zeeshan0201 glad that it worked for you. As for the size itself, you must look to your dependencies and see which ones you really need to. You may not need that dependency at all, if you're not going to run unit tests for that Android project.

Was this page helpful?
0 / 5 - 0 ratings