问题:

升级新版flutter遇到android运行报错,如下图

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/camera/core/CameraFactory

 

 

 解决方案:

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/camera/core/CameraFactory

 

 

dependencies {
  // CameraX core library using the camera2 implementation
  def camerax_version = "1.0.0-beta11"
  // The following line is optional, as the core library is included indirectly by camera-camera2
  implementation "androidx.camera:camera-core:${camerax_version}"
  implementation "androidx.camera:camera-camera2:${camerax_version}"
  // If you want to additionally use the CameraX Lifecycle library
  implementation "androidx.camera:camera-lifecycle:${camerax_version}"
  // If you want to additionally use the CameraX View class
  implementation "androidx.camera:camera-view:1.0.0-alpha18"
  // If you want to additionally use the CameraX Extensions library
  implementation "androidx.camera:camera-extensions:1.0.0-alpha18"
}

 

参考链接:https://developer.android.com/jetpack/androidx/releases/camera

相关文章:

  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2021-07-29
  • 2021-09-13
  • 2022-12-23
猜你喜欢
  • 2021-12-10
  • 2021-08-19
  • 2021-04-04
  • 2022-12-23
  • 2021-05-05
  • 2021-04-22
相关资源
相似解决方案