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

Error linking module #16

Closed
tafelito opened this issue May 26, 2017 · 11 comments
Closed

Error linking module #16

tafelito opened this issue May 26, 2017 · 11 comments

Comments

@tafelito
Copy link

Hi, I tried to use this package but when I do the link it throws this error and it won't build

child_process.js:526
    throw err;
    ^

Error: Command failed: node node_modules/react-native/local-cli/cli.js link react-native-spinkit && node node_modules/react-native/local-cli/cli.js link react-native-linear-gradient
rnpm-install info Linking react-native-spinkit android dependency
rnpm-install info Android module react-native-spinkit has been successfully linked
rnpm-install ERR! Something went wrong while linking. Error: Expected "/*" or ";" but "\"" found.

I'm using RN Version 0.44 on Android 6.0

@jacklam718
Copy link
Owner

@tafelito may I know what OS you use? Windows/Linux/Mac OS X ?

@tafelito
Copy link
Author

tafelito commented May 26, 2017

@jacklam718 I use Mac

@jacklam718
Copy link
Owner

jacklam718 commented May 26, 2017

@tafelito Some people got similar error. FYI Error when linking: "Expected "/*", "//" or "{" but "<" found"

@tafelito
Copy link
Author

@jacklam718 That looks like an iOS issue. I'm testing it on Android, and it doesn't seem to be linking the libraries either

@jacklam718
Copy link
Owner

@tafelito
You can try manually link those libraries. for example:
react-native link react-native-spinkit
react-native link react-native-linear-gradient

can you let me know the result if you tried? thanks!

@tafelito
Copy link
Author

@jacklam718 Same issue linking those manually. And as it says on the bug you mentioned before, thats an error looks like is on the iOS project.pbxproj file. Not sure how's that related to Android though

/.../android/app/src/main/java/com/.../MainApplication.java:27: error: cannot find symbol
            new LinearGradientPackage(),
                ^
  symbol: class LinearGradientPackage
/.../android/app/src/main/java/com/.../MainApplication.java:28: error: cannot find symbol
            new RNSpinkitPackage()
                ^
  symbol: class RNSpinkitPackage
2 errors
:app:compileDebugJavaWithJavac FAILED

@tafelito
Copy link
Author

OK nvm, looks like its working now. The error was just the imports on the android project. Not sure why the link does not add them to the MainApplication.java

Thanks!

@tafelito
Copy link
Author

tafelito commented May 26, 2017

Ok Actually, it didn't throw any error, but the component still not working. It just don't show anything. I used the the One State Button example and this is what it looks like

screenshot_20170526-161801

@jacklam718
Copy link
Owner

@tafelito Did you linked those libraries?

@tafelito
Copy link
Author

@jacklam718 I jus created a new project from scratch and it did work, so I'll have to see what are the differences with my current project and why the linking didn't work.

Thanks!

@jacklam718
Copy link
Owner

jacklam718 commented May 27, 2017

@tafelito 🤔
I jus created a new project from scratch and it did work you can run react-native link on that new project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants