docs: Update Android TROUBLESHOOTING

This commit is contained in:
Marc Rousavy 2021-07-08 12:03:00 +02:00 committed by GitHub
parent 1033610382
commit 63cc806bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,13 +46,14 @@ Before opening an issue, make sure you try the following:
npm i # or "yarn"
```
2. Since the Android implementation uses the not-yet fully stable **CameraX** API, make sure you've browsed the [CameraX issue tracker](https://issuetracker.google.com/issues?q=componentid:618491%20status:open) to find out if your issue is a limitation by the **CameraX** library even I cannot get around.
3. Make sure your minimum SDK version is **21 or higher**, and target SDK version is **30 or higher**. See [the example's `build.gradle`](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/android/build.gradle#L5-L9) for reference.
3. Make sure your minimum SDK version is **21 or higher**, and target SDK version is **30 or higher**. See [the example's `build.gradle`](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/android/build.gradle#L5-L10) for reference.
1. Open your `build.gradle`
2. Set `buildToolsVersion` to `30.0.0` or higher
3. Set `compileSdkVersion` to `30` or higher
4. Set `targetSdkVersion` to `30` or higher
5. Set `minSdkVersion` to `21` or higher
6. Update the Gradle Build-Tools version to `4.1.2` or higher:
6. Set `ndkVersion` to `"20.1.5948944"` or higher
7. Update the Gradle Build-Tools version to `4.1.2` or higher:
```
classpath("com.android.tools.build:gradle:4.1.2")
```
@ -61,7 +62,7 @@ Before opening an issue, make sure you try the following:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
```
5. If you're having runtime issues, check the logs in Android Studio/Logcat to find out more. In Android Studio, go to **View** > **Tool Windows** > **Logcat** (<kbd>⌘</kbd>+<kbd>6</kbd>) or run `adb logcat` in Terminal.
6. If a camera device is not being returned by [`Camera.getAvailableCameraDevices()`](/docs/api/classes/camera.camera-1#getavailablecameradevices), make sure it meets the minimum requirements - that is a minum supported harwdware level of `LIMITED` or above. See [this section in the Android docs](https://developer.android.com/reference/android/hardware/camera2/CameraDevice#reprocessing) for more information.
6. If a camera device is not being returned by [`Camera.getAvailableCameraDevices()`](/docs/api/classes/camera.camera-1#getavailablecameradevices), make sure it is a Camera2 compatible device. See [this section in the Android docs](https://developer.android.com/reference/android/hardware/camera2/CameraDevice#reprocessing) for more information.
## Issues