Commit 98544862 authored by Syan's avatar Syan

0.0.8 xml文件修复

parent 07df71c5
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
### Android ### Android
- android 下build.gradle文件添加 - android 下build.gradle文件添加 maven { url "https://jitpack.io" }
``` ```
allprojects { allprojects {
repositories { repositories {
...@@ -58,7 +58,11 @@ ...@@ -58,7 +58,11 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
``` ```
- 注意 安装运行报错
1. 检查自动link是否成功
2. 使用Android Studio 查看MainApplication文件是否添加new RNSyanImagePickerPackage()
3. 使用Android Studio 打开项目检查Gradle是否同步完成
4. 可以运行[ImagePickerExample](https://github.com/syanbo/ImagePickerExample) 该demo,测试Android7.0,6.0拍照选图都为正常
## link失败手动添加 ## link失败手动添加
#### iOS #### iOS
...@@ -72,7 +76,7 @@ ...@@ -72,7 +76,7 @@
#### Android #### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java` 1. Open up `android/app/src/main/java/[...]/MainApplication.java`
- Add `import com.reactlibrary.RNSyanImagePickerPackage;` to the imports at the top of the file - Add `import com.reactlibrary.RNSyanImagePickerPackage;` to the imports at the top of the file
- Add `new RNSyanImagePickerPackage()` to the list returned by the `getPackages()` method - Add `new RNSyanImagePickerPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`: 2. Append the following lines to `android/settings.gradle`:
......
...@@ -5,15 +5,17 @@ ...@@ -5,15 +5,17 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
<provider <application>
android:name="android.support.v4.content.FileProvider" <provider
android:authorities="${applicationId}.provider" android:name="android.support.v4.content.FileProvider"
android:exported="false" android:authorities="${applicationId}.provider"
android:grantUriPermissions="true"> android:exported="false"
<meta-data android:grantUriPermissions="true">
android:name="android.support.FILE_PROVIDER_PATHS" <meta-data
android:resource="@xml/file_paths" /> android:name="android.support.FILE_PROVIDER_PATHS"
</provider> android:resource="@xml/file_paths" />
</provider>
</application>
</manifest> </manifest>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<paths>
<external-path
name="camera_photos"
path="" />
</paths>
</resources>
\ No newline at end of file
{ {
"name": "react-native-syan-image-picker", "name": "react-native-syan-image-picker",
"version": "0.0.7", "version": "0.0.8",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
"keywords": [ "keywords": [
"react-native", "react-native",
"image", "image",
"image-picker" "image-picker",
"syan",
"PictureSelector",
"TZImagePickerController",
"Photo"
], ],
"author": "", "author": "",
"license": "" "license": ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment