简体   繁体   中英

cannot resolve symbol 'CameraConfigurationUtils' on Google Glass

I recently checked out some code from Git on Android Studio. The project uses barcodeScanner, I use CameraConfigurationManager.java but when I check I get an error from CameraConfigurationUtils. Might anyone know why? Thanks!

code:

 private CameraConfigurationManager() {
  }

  static void configure(Camera camera) {
    Camera.Parameters parameters = camera.getParameters();
    parameters.setPreviewSize(1280, 720);
    //parameters.setPreviewSize(1920, 1080);
    configureAdvanced(parameters);
    camera.setParameters(parameters);
    //logAllParameters(parameters);
  }

  private static void configureAdvanced(Camera.Parameters parameters) {
    CameraConfigurationUtils.setBestPreviewFPS(parameters);
    CameraConfigurationUtils.setBarcodeSceneMode(parameters);
    CameraConfigurationUtils.setVideoStabilization(parameters);
    CameraConfigurationUtils.setMetering(parameters);
    CameraConfigurationUtils.setZoom(parameters, ZOOM);
  }

  private static void logAllParameters(Camera.Parameters parameters) {
    if (Log.isLoggable(TAG, Log.INFO)) {
      for (String line : CameraConfigurationUtils.collectStats(parameters).split("\n")) {
        Log.i(TAG, line);
      }
    }
  }

}

You downloaded the zxing source code. The glass module depends on android-common which has the class you're looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM