I'm trying to get the BarcodeEye working in my own project. When I import the project in eclipse and try to run it it's working perfectly.
I then tried the following 3 ways of getting it in android studio.
Does anyone have a clue what is going wrong here?
C:\Users\xx\xx\BarcodeEye\src\com\google\zxing\client\android\camera\AutoFocusManager.java:59: error: method executeOnExecutor in class AsyncTask<Params,Progress,Result> cannot be applied to given types;
outstandingTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
^
required: Executor,CAP#1[]
found: Executor
reason: formal varargs element type CAP#1 is not accessible from class AutoFocusManager
where Params,Progress,Result are type-variables:
Params extends Object declared in class AsyncTask
Progress extends Object declared in class AsyncTask
Result extends Object declared in class AsyncTask
where CAP#1 is a fresh type-variable:
CAP#1 extends Object from capture of ?
C:\Users\xx\xx\BarcodeEye\src\com\github\barcodeeye\migrated\InactivityTimer.java:50: error: method executeOnExecutor in class AsyncTask<Params,Progress,Result> cannot be applied to given types;
inactivityTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
^
required: Executor,CAP#1[]
found: Executor
reason: formal varargs element type CAP#1 is not accessible from class InactivityTimer
where Params,Progress,Result are type-variables:
Params extends Object declared in class AsyncTask
Progress extends Object declared in class AsyncTask
Result extends Object declared in class AsyncTask
where CAP#1 is a fresh type-variable:
CAP#1 extends Object from capture of ?
C:\Users\xx\xx\BarcodeEye\src\com\google\zxing\client\android\share\AppPickerActivity.java:35: error: method executeOnExecutor in class AsyncTask<Params,Progress,Result> cannot be applied to given types;
backgroundTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
^
required: Executor,CAP#1[]
found: Executor
reason: formal varargs element type CAP#1 is not accessible from class AppPickerActivity
where Params,Progress,Result are type-variables:
Params extends Object declared in class AsyncTask
Progress extends Object declared in class AsyncTask
Result extends Object declared in class AsyncTask
where CAP#1 is a fresh type-variable:
CAP#1 extends Object from capture of ?
Note: C:\Users\xx\xx\BarcodeEye\src\com\github\barcodeeye\scan\api\CardPresenter.java uses or overrides 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'.
Alright after taking a closer look at the AsyncTasks
themselfs I figured out where the error was coming from.
Apparently when converting the project to android studio it isn't taking the values for the asyncTask
It was looking like this
AsyncTask<?, ?, ?> someTask;
I then went on and changed all the AsyncTask to hold the appropriate features.
So if anyone else is experiencing this problem, check your AsyncTask identifier, this is what is causing the problem