kevincaicedo / imei_plugin

plugin for get imei in android with flutter
MIT License
31 stars 44 forks source link

Android dependency 'androidx.media:media' has different version for the compile (1.0.0-rc01) and runtime (1.0.0) classpath. #6

Open louia opened 5 years ago

louia commented 5 years ago

i have this message and i can't compile my app. Flutter v1.5.8 Dart 2.3.0 on dev channel


Android dependency 'androidx.media:media' has different version for the compile (1.0.0-rc01) and runtime (1.0.0) classpath
mikegazzaruso commented 5 years ago

Try to force the dependency in you app level build.gradle:

` android { compileSdkVersion 28

defaultConfig {
   // Your code
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
   // Your build types if any
}

configurations.all {
    resolutionStrategy {
        force 'androidx.media:media:1.0.0'
    }
}

} `

louia commented 5 years ago

not work at all.

i have upgrade my sdk and plugin version of flutter/android studio to Flutter : 1.7.3 dart : 2.3.2

and i think the problem come from with my other packages i use for my project :


  geolocator: ^3.0.1
  geocoder: 0.1.2
  url_launcher: ^5.0.2
  sqflite: any
  path_provider: any
  dbcrypt: ^1.0.0
  flushbar: ^1.4.0
  vibration: 1.0.2
  shared_preferences: ^0.5.2
  http: ^0.12.0+2
  flutter_offline: ^0.2.4+1
  flutter_secure_storage: ^3.2.1+1
#  imei_plugin: 1.1.0```

because when i create a neutral empty project, imei plugin work just fine.