README update for com.android.support build issue

This commit is contained in:
Dāvis Nicmanis 2018-01-16 11:33:20 +02:00
parent 9ea1e4e664
commit 4e77cb502e

View File

@ -450,7 +450,7 @@ To see more of the `react-native-camera` in action, you can check out the source
## Q & A
#### meta-data android 26
#### Q: When I try to build my project, I get following error:
```
AndroidManifest.xml:25:13-35 Error:
Attribute meta-data#android.support.VERSION@value value=(26.0.2) from [com.android.support:exifinterface:26.0.2] Android
@ -458,26 +458,19 @@ Manifest.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 <meta-data> element at AndroidManifest.xml:23:9-25:38 to override.
```
#### A: As the error message hints `com.android.support:exifinterface:26.0.2` is already found in `com.android.support:support-v4:26.0.1`
To fix this issue, modify your project's `android/app/build.gradle` as follows:
```Gradle
dependencies {
compile (project(':react-native-camera')) {
exclude group: "com.android.support"
}
Add this to your AndroidManifest.xml:
- [ ] xmlns:tools="http://schemas.android.com/tools"
```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
compile ('com.android.support:exifinterface:26.0.1') {
force = true;
}
}
```
- [ ] tools:node="replace"
```xml
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
tools:node="replace"
>
```
## Open Collective
We are just beginning a funding campaign for react-native-camera. Contributions are greatly appreciated. When we gain more than $250 we will begin distributing funds to core maintainers in a fully transparent manner. Feedback for this process is welcomed, we will continue to evolve the strategy as we grow and learn more.