-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Error on running react-native project : MainApplication.java:5: error: cannot find symbol import com.facebook.react.ReactApplication; #22033
Comments
I have the same issue. Seems like "android" folder is missing referenced here:
|
same problem here ... please help us |
I have the same problem...and I looked into node_modules/react-native and there is no "android" folder like it used to be in previous version, did you find any solution? |
@phorvicheka doesnt works
Edit This was the reason |
I had the same problem - adding the following block to
Versions |
I have the same problem, and i have tried suggested solutions here and even in stack overflow, but none worked for me. Also i couldn't find "android" folder in node_modules/react-native folder |
At the end, I stopped trying using expo and then eject the app, instead of that, I used the option "Build Projects with native code" from React Native official page, https://facebook.github.io/react-native/docs/getting-started...and It worked like expected |
I also have same problem. I follow all the suggestions which are provided here. |
I do not find 'android' folder under node_modules/react-native. |
Any update on this? |
Just updated from |
OK, I've figured out the problem, at least in my case. Running What I can't work out is why it resolves correctly if I go back to the commit before the upgrade:
Maybe a change in resolution rules on the newer gradle version that ships with 0.58? |
I had the same problem, follow the link: node_modules/react-native/android/com.facebbok.react/react-native. |
didn't work for me..
|
Same as ChaabaneFahmi for me! |
Same here. No android folder in react-native/ Any update ? |
In my case: react-native link --> solved the error. |
Getting very similar error within packageList (also get in MainApplication if link in there):
(For now removed as not essential) |
After many attempts, this error came back to me all the time, I created new projects and nothing. At the end I saw in a video that instead of using expo eject they used the command react-native eject. It seemed silly but I tried it and it seems that I must work in another way since I managed to make the mistake. I wanted to do the eject to work with realm and I got it installed and it worked ^^ Sorry if you do not understand, use google translator. Summary use react-native eject instead of expo eject. Good luck |
@aronedwards91 did you find any solution? |
I don't know if I'm the only one but my error looks like this:
|
i also getting error while build android package error
FAILURE: Build failed with an exception.
BUILD FAILED in 22s |
I'm having this error:
npmPackages: react-native@0.60.4 com.android.tools.build:gradle:3.4.1 dependencies { I've been updating RN 0.55.4 -> 0.60.4 |
@juroMin me too, any fix? |
facing same issue while upgrade from RN 0.59.9 to 0.60.5. |
having the same issue while upgrade from RN 0.59 to 0.60 @juroMin were you able to find any solution? |
while upgrading to from RN 0.59.9 to 0.60.5 using https://react-native-community.github.io/upgrade-helper/?from=0.59.9&to=0.60.5 i forgot to make changes in android/app/build.gradle file, after making the following changes my issue was solved |
@basha777 try adding to the bottom of your app/build.gradle
|
@ckOfor my issue is solved now. |
@SameeraMadushan refer my comment |
while upgrading to from RN 0.59.9 to 0.60.5 using https://react-native-community.github.io/upgrade-helper/?from=0.59.9&to=0.60.5 i forgot to make changes in android/app/build.gradle file, after making the following changes my issue was solved |
In my case, the problem is solved by appending |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
I have created project using expo ie
expo init helloworld
then ejected it using
expo eject
.And then I tried to run in emulator with
yarn run android
.I got the following error.
FAILURE: Build failed with an exception.
Execution failed for task ':app:compileDebugJavaWithJavac'.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 9.46 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/getting-started.html
Done in 12.38s.
Info
$ react-native info
Scanning folders for symlinks in D:\gajurlab\helloworld\node_modules (25ms)
Environment:
OS: Windows 8.1
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.1.0.0 AI-173.4720617
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4
The text was updated successfully, but these errors were encountered: