Skip to content

Commit 415834e

Browse files
authored
Update README about Android SDK version (#1887)
* Update README about Android SDK version * Add android.permission.READ_MEDIA_IMAGES * Update README.md
1 parent 6e757b2 commit 415834e

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ImagePicker.openPicker({
6464
**Android: The prop 'cropping' has been known to cause videos not to be displayed in the gallery on Android. Please do not set cropping to true when selecting videos.**
6565

6666

67-
### Select from camera
67+
### Select from camera
6868

6969
#### Image
7070

@@ -212,15 +212,25 @@ In Xcode open Info.plist and add string key `NSPhotoLibraryUsageDescription` wit
212212

213213
- Open your Xcode project
214214
- Go to your project settings by opening the project name on the Navigation (left side)
215-
- Select your project in the project list
215+
- Select your project in the project list
216216
- Should be into the Info tab and add in Localizations the language your app was missing throughout the +
217217
- Rebuild and you should now have your app camera and gallery with the classic ios text in the language you added.
218218

219219
### Android
220220

221-
- **VERY IMPORTANT** Add the following to your `build.gradle`'s repositories section. (android/build.gradle)
221+
- **VERY IMPORTANT** Add the following to your `build.gradle`'s repositories section and change Android SDK version to 33. (android/build.gradle)
222222

223223
```gradle
224+
buildscript {
225+
ext {
226+
buildToolsVersion = "31.0.0"
227+
minSdkVersion = 21
228+
compileSdkVersion = 33
229+
targetSdkVersion = 33
230+
...
231+
}
232+
}
233+
224234
allprojects {
225235
repositories {
226236
mavenLocal()
@@ -251,23 +261,6 @@ android {
251261
}
252262
```
253263

254-
- Use Android SDK >= 26 (android/app/build.gradle)
255-
256-
```gradle
257-
android {
258-
compileSdkVersion 27
259-
buildToolsVersion "27.0.3"
260-
...
261-
262-
defaultConfig {
263-
...
264-
targetSdkVersion 27
265-
...
266-
}
267-
...
268-
}
269-
```
270-
271264
- Minimum Gradle version if you are using react-native-image-crop-picker >= 0.35.0
272265

273266
```
@@ -280,6 +273,9 @@ android {
280273

281274
Reference for more details https://github.com/ivpusic/react-native-image-crop-picker/issues/1406
282275

276+
- If you use SDK version >= 33, add following to `app/src/main/AndroidManifest.xml`
277+
- `<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>`
278+
283279
- [Optional] If you want to use camera picker in your project, add following to `app/src/main/AndroidManifest.xml`
284280
- `<uses-permission android:name="android.permission.CAMERA"/>`
285281

0 commit comments

Comments
 (0)