I don't figure out why this error. I was compiling on another computer and the release compilation went ok, but on this computer, I get :
Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
:app:preBuild
:app:preReleaseBuild
:app:checkReleaseManifest
:app:preDebugBuild
:app:prepareComAndroidSupportAppcompatV71910Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices4323Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl
:app:compileReleaseRenderscript
:app:generateReleaseBuildConfig
:app:mergeReleaseAssets
:app:processReleaseManifest
:app:crashlyticsCleanupResourcesRelease
:app:crashlyticsUploadStoredDeobsRelease
:app:crashlyticsGenerateResourcesRelease
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources
:app:mergeReleaseResources
:app:processReleaseResources
:app:generateReleaseSources
:app:compileReleaseJava
/Users/wimha/wimhaAndroidApp/app/src/main/java/com/google/zxing/client/android/camera/AutoFocusManager.java:63: 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 ?
/Users/wimha/wimhaAndroidApp/app/src/main/java/com/google/zxing/client/android/InactivityTimer.java:52: 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 ?
/Users/wimha/wimhaAndroidApp/app/src/main/java/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 ?
3 errors
:app:compileReleaseJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileReleaseJava'.
> 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: 1 mins 56.213 secs
Any idea ?
You don't need to uninstall Java 8. Just open "Project structure" (Ctrl+alt+shift+s), select "SDK Location" and set "JDK location" to path, whith JDK 7.