Skip to content
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

Unable to use local version of React Native #19358

Closed
3 tasks done
MarkOSullivan94 opened this issue May 20, 2018 · 8 comments
Closed
3 tasks done

Unable to use local version of React Native #19358

MarkOSullivan94 opened this issue May 20, 2018 · 8 comments
Labels
Platform: Android Android applications. Platform: macOS Building on macOS. Resolution: Locked This issue was locked by the bot.

Comments

@MarkOSullivan94
Copy link

Currently trying to make changes to the React Native source to help improve the share functionality for Android (or at least try to).

Was following this guide: https://facebook.github.io/react-native/docs/building-from-source.html#3-adding-the-reactandroid-project

I got to this step: https://facebook.github.io/react-native/docs/building-from-source.html#3-adding-the-reactandroid-project

Unfortunately after running react-native run-android, I was no longer getting a successful build.

app build.gradle - https://github.com/MarkOSullivan94/ReactNativeShareExample/blob/master/android/app/build.gradle

settings.gradle - https://github.com/MarkOSullivan94/ReactNativeShareExample/blob/master/android/settings.gradle

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 10.1.0
Yarn: Not Found
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: github:MarkOSullivan94/react-native#master => 1000.0.0

Steps to Reproduce

Clone my example project which I was building to test out the changes to the RN source: https://github.com/MarkOSullivan94/ReactNativeShareExample

Then run it with react-native run-android.

Expected Behavior

The app would build successfully.

Actual Behavior

 react-native run-android
Scanning folders for symlinks in /Users/mos/Projects/ReactNative/ShareExample/node_modules (12ms)
(node:92189) ExperimentalWarning: The fs.promises API is experimental
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...

FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/mos/Projects/ReactNative/ShareExample/android/settings.gradle' line: 6

* What went wrong:
A problem occurred evaluating settings 'ShareExample'.
> Cannot cast object '../node_modules/react-native/android' with class 'java.lang.String' to class 'java.io.File'

* 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.08 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
@MarkOSullivan94
Copy link
Author

@grabbou you told me to ping you and @hramos about seeking help this issue. Hoping one of you could help point me in the right direction.

@stale
Copy link

stale bot commented Aug 27, 2018

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 "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 27, 2018
@MarkOSullivan94
Copy link
Author

Still requires community attention

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 27, 2018
@hramos
Copy link
Contributor

hramos commented Aug 27, 2018

Perhaps @dulmandakh or @gengjiawen can help.

@gengjiawen
Copy link
Contributor

@MarkOSullivan94 Can you upgrade the project to to 0.57.rc3. The forked react-native now is not working on windows.

@gengjiawen
Copy link
Contributor

Okay, using circleci find out the reason, in setting.gradle line 6, it should be , not =

project(':ReactAndroid').projectDir = new File(
    rootProject.projectDir = '../node_modules/react-native/android'
)

@gengjiawen
Copy link
Contributor

Actually you project has inconsistency. You may need to cleanup. For your project now, You need to add to build.gradle

        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }

@MarkOSullivan94
Copy link
Author

Thanks for the help @hramos @gengjiawen. Now stuck on another issue which I've opened as a new issue: #21776

@facebook facebook locked as resolved and limited conversation to collaborators Aug 28, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Platform: macOS Building on macOS. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants