修复 所有脚本在Android 4.4都不能正常运行的问题

This commit is contained in:
hyb1996
2018-11-10 16:57:02 +08:00
parent 6e53f0761b
commit 94e9f5f34f
3 changed files with 9 additions and 2 deletions

View File

@@ -2,7 +2,9 @@
module.exports = function (runtime, scope) {
function images(){
}
util.__assignFunctions__(runtime.images, images, ['requestScreenCapture', 'captureScreen', 'read', 'copy', 'load', 'clip', 'pixel'])
if(android.os.Build.VERSION.SDK_INT >= 21){
util.__assignFunctions__(runtime.images, images, ['requestScreenCapture', 'captureScreen', 'read', 'copy', 'load', 'clip', 'pixel'])
}
images.opencvImporter = JavaImporter(
org.opencv.core.Point,
org.opencv.core.Point3,