android开发rn插件,RN 安装react-native-camera插件
安装插件npm install react-native-camera --savereact-native link react-native-camera遇到的问题java.lang.RuntimeException: Android dependency 'androidx.slidingpanelayout:slidingpanelayout' has different versionf
安装插件
npm install react-native-camera --save
react-native link react-native-camera
遇到的问题
java.lang.RuntimeException: Android dependency 'androidx.slidingpanelayout:slidingpanelayout' has different version
for the compile (1.0.0-rc01) and runtime (1.0.0) classpath.You should manually set the same version via DependencyResolution
解决方法:
(1)android/gradle.properties加入
android.enableJetifier=true
android.useAndroidX=true
(2)android/app/build.gradle /defaultConfig加上
multiDexEnabled true
(3)android/build.gradle更改依赖
classpath 'com.android.tools.build:gradle:3.3.1'
(4)android/gradle/wrapper/gradle-wrapper.properties文件修改
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
更多推荐
所有评论(0)