cordova-plugin-wezka-nativecamera
cordova-plugin-wezka-nativecamera copied to clipboard
Does not build with crosswalk
Trying to build with crosswalk + ionic framework. Getting build error -
:compileDebugJava/Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/src/com/wezka/nativecameraplugin/NativeCameraLauncher.java:29: error: cannot find symbol import org.apache.cordova.ExifHelper; ^ symbol: class ExifHelper location: package org.apache.cordova /Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/src/com/wezka/nativecameraplugin/NativeCameraLauncher.java:149: error: cannot find symbol rotate = exif.getOrientation(); ^ symbol: method getOrientation() location: variable exif of type ExifHelper /Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/src/com/wezka/nativecameraplugin/NativeCameraLauncher.java:251: error: cannot find symbol exif.resetOrientation(); ^ symbol: method resetOrientation() location: variable exif of type ExifHelper Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 3 errors FAILED
FAILURE: Build failed with an exception.
-
What went wrong: Execution failed for task ':compileDebugJava'.
Compilation failed; see the compiler error output for details.
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12.508 secs
/Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/cordova/node_modules/q/q.js:126 throw e; ^ Error code 1 for command: /Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/gradlew with args: assembleDebug,-b,/Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/build.gradle,-Dorg.gradle.daemon=true ERROR running one or more of the platforms: Error: /Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/cordova/run: Command failed with exit code 8 You may not have the required environment or OS to run this project
Please suggest a fix. I need to use the plugin asap. Thanks :)
Update src/android/NativeCameraLauncher.java // disable import org.apache.cordova.ExifHelper;
// import org.apache.cordova.ExifHelper;
Update src/android/ExifHelper.java // add method getOrientation, resetOrientation
public int getOrientation() {
int o = Integer.parseInt(this.orientation);
if (o == ExifInterface.ORIENTATION_NORMAL) {
return 0;
} else if (o == ExifInterface.ORIENTATION_ROTATE_90) {
return 90;
} else if (o == ExifInterface.ORIENTATION_ROTATE_180) {
return 180;
} else if (o == ExifInterface.ORIENTATION_ROTATE_270) {
return 270;
} else {
return 0;
}
}
public void resetOrientation() {
this.orientation = "" + ExifInterface.ORIENTATION_NORMAL;
}
I am getting the same error.
cordova version : 5.3.3
Same error, cordova version: 7.0.1