AndroidVideoKit icon indicating copy to clipboard operation
AndroidVideoKit copied to clipboard

Getting Errors in VideoUtils.java file.

Open aravindan1992 opened this issue 10 years ago • 0 comments

Hi to all, I am Aravind. I recently tried your jwfing/ AndroidVideoKit / src / com / avos / minute / recorder / VideoUtils.java file in my project.

https://github.com/jwfing/AndroidVideoKit/blob/master/src/com/avos/minute/recorder/VideoUtils.java

I am getting errors in the code as "Resource leak: 'unassigned Closeable value' " is never closed at line 46, 47, 79, 80 and getting another error as "The value of the local variable b is not used" in line 85.

If I try to close the value by adding " RandomAccessFile randomAccessFile = null; " after line 78. And called the close function as,

close(randomAccessFile);

private static void close(RandomAccessFile randomAccessFile) { try { if (randomAccessFile!= null) { randomAccessFile.close(); } } catch (IOException e) { e.printStackTrace(); } }

Now I am getting error as "RandomAccessFile cannot be resolved to a variable" at, (close(randomAccessFile); and also warning at, private static void close(RandomAccessFile randomAccessFile) as "The method close(RandomAccessFile) from the type VideoUtils is never used locally".

I am using Eclipse Kepler Standard/SDK. Can you help me to clear the errors.?

aravindan1992 avatar Jul 22 '14 11:07 aravindan1992