beefe / react-native-picker

A Native Picker with high performance.
1.75k stars 786 forks source link

A way to solve the problem that can't apply to RN version 0.57, or higher #375

Open jwb1220 opened 5 years ago

jwb1220 commented 5 years ago

When I'm use Android Studio run app, pop an err: Program type already present: android.support.design.widget.CoordinatorLayout$1. So in node_modules/react-native-picker/android/build.gradle, replace
compile('com.facebook.react:react-native:+') { exclude group: 'com.android.support' } compile 'com.android.support:support-annotations:+' with compile 'com.facebook.react:react-native:+'

用Android Studio运行项目报 CoordinatorLayout 重复引用,为了不改android的compileSdkVersion,在 node_modules/react-native-picker/android/build.gradle 中, 用 compile('com.facebook.react:react-native:+') { exclude group: 'com.android.support' } compile 'com.android.support:support-annotations:+' 替换 compile 'com.facebook.react:react-native:+'