New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Andoid app showing error ":app:compileDebugJavaWithJavac FAILED " #3437
Comments
Solved! A new project with a different name fixed it. |
hi @sankhadeeproy007 did you just create a new project and copy over your files or what? |
No, it happened with a new project. However I did create a new project and copied some files over later in another project. |
It should be documented somewhere, you can't create a react-native project called |
It just happened to me. I started a hello world project but ended up doing more there.. finally, wanted to move them over. Created a new project with RN init and copied my assets over. npm install installed all dependencies and react-native run-android fails with this error "app:compileDebugJavaWithJavac FAILED". Any workarounds apart from recreating the project with different name? |
please help me to remove this error
|
I might be late but this may help to others also.yesterday I came across asame issue then I changed sdk versions in gradle file ,problem solved :) |
You creating a new project and new name doesn't look like a real solution to this. |
Seems there is a bug in android studio, i got the same error when i started a new project, in my case, it happens because i choose scrolling activity first by mistake, and then i go back with the previous button, choose empty activity with a name MainActivity. After i clicked the finish button, the stupid AS create an activity called MainActivity, but instead of activity_main.xml in layout folder, there was the content_scrolling.xml has been created. |
no problem, thank to all for reply i have solved this issue last time.
…On Tue, Jan 3, 2017 at 10:25 AM, Zain Zhu ***@***.***> wrote:
Seems there is a bug in android studio, i got the same error when i
started a new project, in my case, it happens because i choose scrolling
activity first by mistake, and then i go back with the previous button,
choose empty activity with a name MainActivity. After i clicked the finish
button, the stupid AS create an activity called MainActivity, but instead
of activity_main.xml in layout folder, there was the content_scrolling.xml
has been created.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3437 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APlnXWAfEb0W14kO_s2qXYX7hWV47iKxks5rOdu_gaJpZM4GPQVL>
.
--
zubizubi
|
If you have Android studio, then try open the android code, and run 'project' ==> 'clean', or just do |
|
Please help me solve error With nativescript with JavaScript. When I tried to built project it gives this error. I tried some of above solutions. But nothing works for me.
|
Getting same issue
|
please help me to remove this error 1 error FAILURE: Build failed with an exception.
BUILD FAILED Total time: 24.051 secs |
Also running into this. Had a project running successfully on another machine, cloned my repo to this machine, and as far as I can tell I have everything set up correctly but still getting this pop up. Running |
I was getting same issue -> failed for task ':app:compileDebugJavaWithJavac'. Updating react-native-fbsdk to 0.7.0 in package.json fixed it for me! :) |
Try the this stack overflow answer Basically clear global |
please help me !
BUILD FAILED Total time: 23.054 secs |
I solved this issue by deleting the .gradle folder inside the android folder. |
Hi, I seem to have followed all the steps given in your docs correctly. I also got the iOS app to work, but I'm getting this error whenever I try to run it in android.
"Sankhadeeps-MacBook-Air:native sankhadeeproy$ react-native run-android
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee061Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore061Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco061Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline061Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp061Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0120Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig 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:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac
/Users/sankhadeeproy/Sites/projects/native/android/app/src/main/java/com/native/MainActivity.java:1: error: expected
package com.native;
^
/Users/sankhadeeproy/Sites/projects/native/android/app/build/generated/source/r/debug/com/native/R.java:8: error: expected
package com.native;
^
/Users/sankhadeeproy/Sites/projects/native/android/app/build/generated/source/buildConfig/debug/com/native/BuildConfig.java:4: error: expected
package com.native;
^
3 errors
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
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: 27.348 secs
Could not install the app on the device, see the error above."
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: