rnc-archive / rncamera-example

This contains the RNCamera Example
https://github.com/react-native-community/react-native-camera
45 stars 45 forks source link

Execution failed for task ':react-native-camera:processDebugAndroidTestManifest' #2

Closed adrianha closed 6 years ago

adrianha commented 6 years ago

Just cloned this example and got this error. any idea @jgfidelis ?

`Error:Execution failed for task ':react-native-camera:processDebugAndroidTestManifest'.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.2) from [com.android.support:exifinterface:26.0.2] AndroidManifest.xml:25:13-35 is also present at [com.android.support:support-v4:26.0.1] AndroidManifest.xml:28:13-35 value=(26.0.1). Suggestion: add 'tools:replace="android:value"' to element at manifestMerger2463096434109190601.xml:23:9-25:38 to override.`

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

sibelius commented 6 years ago

U need React native link

And follow Q & A README section

adrianha commented 6 years ago

i think its already linked.. it is still cannot resolve the package (Error:(6, 30) error: cannot find symbol class RNCameraPackage)

screen shot 2018-02-04 at 18 14 14
kueda commented 6 years ago

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?

gwro commented 6 years ago

I have the same problem right now.

cooolinho commented 6 years ago

Same issue here 😠

ChristineTzeng commented 6 years ago

Same here

Aashir1 commented 6 years ago

Same Issue

841660202 commented 6 years ago

follow

justinushermawan commented 6 years ago

I solved this issue by running this command:
yarn add react-native-camera@1.0.1

givik commented 6 years ago

try this: react-native link react-native-camera

iratner commented 6 years ago

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