Closed Proberts closed 7 years ago
I am using Gradle 2.14.1 and cannot reproduce this. Are you using older version or?
I'm using Gradle 2.4 (installed by React Native.)
I just experienced this too using 2.4.
I added vectorDrawables.useSupportLibrary = true to defaultConfig{}. Im using gradle 2.2.3
defaultConfig {
...
vectorDrawables.useSupportLibrary = true
}
@Proberts please check updated android post-install instructions. it should solve your problem
Version
Tell us which versions you are using:
Platform
Expected behaviour
"react-native run-android" should build react-native-image-crop-picker and dependencies (ucrop)
Actual behaviour
Error: Width (0) and height (0) cannot be < = 0." on file res/drawable/ucrop_vector_loader.xm
Steps to reproduce
rnpm install react-native-image-picker
add PickerPackage lines to MainApplicaiton.java
react-native run-android
Solution
Per [https://github.com/Yalantis/uCrop/issues/84](this ucrop issue), react-native-image-picker/android/build.gradle needs two additions. in defaultConfig{} add:
generatedDensities = []
and under android{} add:
(These two also need to be added to the RN app's android/app/build.gradle)
i.e. react-native-image-crop-picker/android/build.gradle should look like: