Closed adrianha closed 6 years ago
U need React native link
And follow Q & A README section
i think its already linked.. it is still cannot resolve the package (Error:(6, 30) error: cannot find symbol class RNCameraPackage)
Having the same problem. Steps to reproduce attempting to follow the steps at https://github.com/react-native-community/react-native-camera/blob/master/README.md:
git clone git@github.com:react-native-community/rncamera-example.git
cd rncamera-example/
yarn install
react-native link react-native-camera
react-native run-android
Output from last statement looks like
Scanning folders for symlinks in /path/to/rncamera-example/node_modules (9ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
> Configure project :app
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
> Configure project :react-native-camera
Configuration 'compile' in project ':react-native-camera' is deprecated. Use 'implementation' instead.
> Task :react-native-camera:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :app:compileDebugJavaWithJavac
/path/to/rncamera-example/android/app/src/main/java/com/rncameraexample/MainApplication.java:6: error: cannot find symbol
import org.reactnative.camera.RNCameraPackage;
^
symbol: class RNCameraPackage
location: package org.reactnative.camera
/path/to/rncamera-example/android/app/src/main/java/com/rncameraexample/MainApplication.java:27: error: cannot find symbol
new RNCameraPackage()
^
symbol: class RNCameraPackage
2 errors
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.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
39 actionable tasks: 39 executed
@sibelius, if this isn't a bug, what should I change above to get this to run?
I have the same problem right now.
Same issue here ðŸ˜
Same here
Same Issue
follow
I solved this issue by running this command:
yarn add react-native-camera@1.0.1
try this: react-native link react-native-camera
I think the import might be wrong in the docs. In MainApplication I changed to
import org.reactnative.camera.RNCameraPackage;
and was able to build
Just cloned this example and got this error. any idea @jgfidelis ?
`Error:Execution failed for task ':react-native-camera:processDebugAndroidTestManifest'.
And also when i tried to run
react-native run-android
it shows error like this:/path_to_your_project/android/app/src/main/java/com/rncameraexample/MainApplication.java:6: error: cannot find symbol import org.reactnative.camera.RNCameraPackage; ^ symbol: class RNCameraPackage location: package org.reactnative.camera