From e71b802d6e4f7055996db9867ac76d984a09e96a Mon Sep 17 00:00:00 2001 From: Adam Comella Date: Wed, 3 May 2017 15:35:58 -0700 Subject: [PATCH 1/2] Add .vscode/ to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e58ac8608..5b258f672 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,5 @@ yarn.lock ## Android iml *.iml + +.vscode/ \ No newline at end of file From 48e868324552416520d30aa058984a2e30e93508 Mon Sep 17 00:00:00 2001 From: Adam Comella Date: Wed, 3 May 2017 15:42:02 -0700 Subject: [PATCH 2/2] Avoid conflicting with other FileProviders If multiple AndroidManifest.xml files specify FileProviders (e.g. the app, a library like react-native-image-picker), you may receive compilation errors when these AndroidManifest.xml files are merged due to conflicts in fields such as `android:authorities` and `android:resource`. This occurs when multiple AndroidManifest.xml files specify a `android.support.v4.content.FileProvider`. To avoid the conflict, we subclass `android.support.v4.content.FileProvider` and then we refer to our subclass in the AndroidManifest.xml file to avoid the conflict. This solution is described here: http://stackoverflow.com/a/41550634 --- android/src/main/AndroidManifest.xml | 2 +- android/src/main/java/com/imagepicker/FileProvider.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 android/src/main/java/com/imagepicker/FileProvider.java diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 49c58f119..7cb436039 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -5,7 +5,7 @@ > diff --git a/android/src/main/java/com/imagepicker/FileProvider.java b/android/src/main/java/com/imagepicker/FileProvider.java new file mode 100644 index 000000000..9c706e6d3 --- /dev/null +++ b/android/src/main/java/com/imagepicker/FileProvider.java @@ -0,0 +1,4 @@ +package com.imagepicker; + +public class FileProvider extends android.support.v4.content.FileProvider { +}