Execution failed for task ':app:compileDebugJavaWithJavac'.
iroshanAV opened this issue · 4 comments
When i try to run react-native run-android
command after installing and adding import statement to the App.js file , i get this error...
H:\reactp\reactN\SR\SRApp>react-native run-android
Scanning folders for symlinks in H:\reactp\reactN\SR\SRApp\node_modules (28ms)
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:react-native-sound-recorder:preBuild UP-TO-DATE
:react-native-sound-recorder:preReleaseBuild UP-TO-DATE
:react-native-sound-recorder:checkReleaseManifest
:react-native-sound-recorder:preDebugAndroidTestBuild UP-TO-DATE
:react-native-sound-recorder:preDebugBuild UP-TO-DATE
:react-native-sound-recorder:preDebugUnitTestBuild UP-TO-DATE
:react-native-sound-recorder:preReleaseUnitTestBuild UP-TO-DATE
:react-native-sound-recorder:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:react-native-sound-recorder:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:react-native-sound-recorder:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:react-native-sound-recorder:prepareComFacebookFrescoDrawee081Library UP-TO-DATE
:react-native-sound-recorder:prepareComFacebookFrescoFbcore081Library UP-TO-DATE
:react-native-sound-recorder:prepareComFacebookFrescoFresco081Library UP-TO-DATE
:react-native-sound-recorder:prepareComFacebookFrescoImagepipeline081Library UP-TO-DATE
:react-native-sound-recorder:prepareComFacebookFrescoImagepipelineOkhttp081Library UP-TO-DATE
:react-native-sound-recorder:prepareComFacebookReactReactNative0201Library UP-TO-DATE
:react-native-sound-recorder:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:react-native-sound-recorder:prepareReleaseDependencies
:react-native-sound-recorder:compileReleaseAidl UP-TO-DATE
:react-native-sound-recorder:compileReleaseNdk UP-TO-DATE
:react-native-sound-recorder:compileLint UP-TO-DATE
:react-native-sound-recorder:copyReleaseLint UP-TO-DATE
:react-native-sound-recorder:compileReleaseRenderscript UP-TO-DATE
:react-native-sound-recorder:generateReleaseBuildConfig UP-TO-DATE
:react-native-sound-recorder:generateReleaseResValues UP-TO-DATE
:react-native-sound-recorder:generateReleaseResources UP-TO-DATE
:react-native-sound-recorder:mergeReleaseResources UP-TO-DATE
:react-native-sound-recorder:processReleaseManifest UP-TO-DATE
:react-native-sound-recorder:processReleaseResources UP-TO-DATE
:react-native-sound-recorder:generateReleaseSources UP-TO-DATE
:react-native-sound-recorder:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:react-native-sound-recorder:compileReleaseJavaWithJavac UP-TO-DATE
:react-native-sound-recorder:extractReleaseAnnotations UP-TO-DATE
:react-native-sound-recorder:mergeReleaseShaders UP-TO-DATE
:react-native-sound-recorder:compileReleaseShaders UP-TO-DATE
:react-native-sound-recorder:generateReleaseAssets UP-TO-DATE
:react-native-sound-recorder:mergeReleaseAssets UP-TO-DATE
:react-native-sound-recorder:mergeReleaseProguardFiles UP-TO-DATE
:react-native-sound-recorder:packageReleaseRenderscript UP-TO-DATE
:react-native-sound-recorder:packageReleaseResources UP-TO-DATE
:react-native-sound-recorder:processReleaseJavaRes UP-TO-DATE
:react-native-sound-recorder:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:react-native-sound-recorder:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:react-native-sound-recorder:mergeReleaseJniLibFolders UP-TO-DATE
:react-native-sound-recorder:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:react-native-sound-recorder:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:react-native-sound-recorder:bundleRelease UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0522Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareSRAppReactNativeSoundRecorderUnspecifiedLibrary UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
H:\reactp\reactN\SR\SRApp\android\app\src\main\java\com\srapp\MainApplication.java:6: error: cannot find symbol
import com.kevinresol.react_native_sound_recorder.RNSoundRecorderPackage;
^
symbol: class RNSoundRecorderPackage
location: package com.kevinresol.react_native_sound_recorder
H:\reactp\reactN\SR\SRApp\android\app\src\main\java\com\srapp\MainApplication.java:27: error: cannot find symbol
new RNSoundRecorderPackage()
^
symbol: class RNSoundRecorderPackage
2 errors
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> 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: 10.806 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
H:\reactp\reactN\SR\SRApp>
Had the same error here. Managed to solve it by completely uninstalling the library and installing again.
The thing is that react-native uninstall react-native-sound-recorder
did not remove all references to this lib (which had its package name changed in version 1.1.1), so I had to basically follow the installation steps on reverse to remove it.
Is this still an issue?
I assume it is fixed
Hi, kevinresol
I am facing the same issue, I tried to uninstall the library and then added again but still getting the same issue.
this is what I am getting in the error.
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':react-native-sound-recorder:compileDebugJavaWithJavac'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:151)
could you please help me.