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


問題:

升級新版flutter遇到android運行報錯,如下圖

 

 

 解決方案:

 

 

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM